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
- #address_pretty ⇒ Object
- #city ⇒ Object
- #city=(thing) ⇒ Object
- #state ⇒ Object
- #state=(thing) ⇒ Object
- #zip ⇒ Object
- #zip=(thing) ⇒ Object
- #zipcode ⇒ Object
- #zipcode=(thing) ⇒ Object
Instance Method Details
#address_pretty ⇒ Object
28 29 30 |
# File 'lib/addressable.rb', line 28 def address_pretty stringify_array address_array end |
#city ⇒ Object
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 |
#state ⇒ Object
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 |
#zip ⇒ Object
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 |
#zipcode ⇒ Object
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 |