Class: TaxCloud::Address
- Inherits:
-
Object
- Object
- TaxCloud::Address
- Defined in:
- lib/address.rb
Instance Attribute Summary collapse
-
#address1 ⇒ Object
Returns the value of attribute address1.
-
#address2 ⇒ Object
Returns the value of attribute address2.
-
#city ⇒ Object
Returns the value of attribute city.
-
#state ⇒ Object
Returns the value of attribute state.
-
#zip4 ⇒ Object
Returns the value of attribute zip4.
-
#zip5 ⇒ Object
Returns the value of attribute zip5.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Address
constructor
A new instance of Address.
- #to_hash ⇒ Object
Constructor Details
#initialize(attrs = {}) ⇒ Address
Returns a new instance of Address.
7 8 9 10 11 12 |
# File 'lib/address.rb', line 7 def initialize(attrs = {}) attrs.each do |sym, val| self.send "#{sym}=", val end end |
Instance Attribute Details
#address1 ⇒ Object
Returns the value of attribute address1.
5 6 7 |
# File 'lib/address.rb', line 5 def address1 @address1 end |
#address2 ⇒ Object
Returns the value of attribute address2.
5 6 7 |
# File 'lib/address.rb', line 5 def address2 @address2 end |
#city ⇒ Object
Returns the value of attribute city.
5 6 7 |
# File 'lib/address.rb', line 5 def city @city end |
#state ⇒ Object
Returns the value of attribute state.
5 6 7 |
# File 'lib/address.rb', line 5 def state @state end |
#zip4 ⇒ Object
Returns the value of attribute zip4.
5 6 7 |
# File 'lib/address.rb', line 5 def zip4 @zip4 end |
#zip5 ⇒ Object
Returns the value of attribute zip5.
5 6 7 |
# File 'lib/address.rb', line 5 def zip5 @zip5 end |
Instance Method Details
#to_hash ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/address.rb', line 14 def to_hash { 'Address1' => address1, 'Address2' => address2, 'City' => city, 'State' => state, 'Zip5' => zip5, 'Zip4' => zip4 } end |