WAStoreAddress


Seaside-Examples-Store-Model

Comment:

A simple model of a billing or shipping address.  Stores strings for a person's name, street, city, and country.  Apart from accessors for these, the only behavior this provides is a #validate method which will throw errors if street, city, or country is nil.

Hierarchy:

ProtoObject
Object
WAStoreAddress

Summary:

instance variables:

city country name street

methods:

instance class
as yet unclassified no messages

Detail:

instance variables:

city
inferredType:
UndefinedObject
country
inferredType:
UndefinedObject
name
inferredType:
UndefinedObject
street
inferredType:
UndefinedObject

instance methods:

as yet unclassified
city

	^ city
city: aString

	city _ aString
country

	^ country
country: aString

	country _ aString
name

	^ name
name: aString

	name _ aString
street

	^ street
street: aString

	street _ aString
validate

	street ifNil: [self error: 'You must provide a street address.'].
	city ifNil: [self error: 'You must provide a city.'].
	country ifNil: [self error: 'You must provide a country.'].

class methods:

^top


- made by Dandelion -