Class: LearnSprout::Address
- Inherits:
-
Object
- Object
- LearnSprout::Address
- Defined in:
- lib/learnsprout/address.rb
Instance Attribute Summary collapse
-
#city ⇒ Object
Returns the value of attribute city.
-
#state ⇒ Object
Returns the value of attribute state.
-
#street ⇒ Object
Returns the value of attribute street.
-
#zip ⇒ Object
Returns the value of attribute zip.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Address
constructor
A new instance of Address.
Constructor Details
#initialize(attrs = {}) ⇒ Address
Returns a new instance of Address.
9 10 11 12 13 14 |
# File 'lib/learnsprout/address.rb', line 9 def initialize(attrs={}) @city = attrs["city"] @state = attrs["state"] @street = attrs["street"] @zip = attrs["zip"] end |
Instance Attribute Details
#city ⇒ Object
Returns the value of attribute city.
4 5 6 |
# File 'lib/learnsprout/address.rb', line 4 def city @city end |
#state ⇒ Object
Returns the value of attribute state.
4 5 6 |
# File 'lib/learnsprout/address.rb', line 4 def state @state end |
#street ⇒ Object
Returns the value of attribute street.
4 5 6 |
# File 'lib/learnsprout/address.rb', line 4 def street @street end |
#zip ⇒ Object
Returns the value of attribute zip.
4 5 6 |
# File 'lib/learnsprout/address.rb', line 4 def zip @zip end |