Module: Addressable

Extended by:
ActiveSupport::Concern
Includes:
FieldsValidator
Defined in:
lib/addressable.rb

Constant Summary collapse

REQUIRED_DATABASE_FIELDS =
[:address1, :address2, :address3, :town, :county, :country, :postcode]

Instance Method Summary collapse

Instance Method Details

#address_prettyObject



28
29
30
# File 'lib/addressable.rb', line 28

def address_pretty
  stringify_array address_array
end

#cityObject



32
33
34
# File 'lib/addressable.rb', line 32

def city
  town
end

#city=(thing) ⇒ Object



36
37
38
# File 'lib/addressable.rb', line 36

def city=(thing)
  self.town = thing 
end

#stateObject



40
41
42
# File 'lib/addressable.rb', line 40

def state
  county
end

#state=(thing) ⇒ Object



44
45
46
# File 'lib/addressable.rb', line 44

def state=(thing)
  self.county = thing 
end

#zipObject



48
49
50
# File 'lib/addressable.rb', line 48

def zip
  postcode
end

#zip=(thing) ⇒ Object



52
53
54
# File 'lib/addressable.rb', line 52

def zip=(thing)
  self.postcode = thing 
end

#zipcodeObject



56
57
58
# File 'lib/addressable.rb', line 56

def zipcode
  postcode
end

#zipcode=(thing) ⇒ Object



60
61
62
# File 'lib/addressable.rb', line 60

def zipcode=(thing)
  self.postcode = thing 
end