Class: GoogleCheckout::Geography::UsState
- Defined in:
- lib/google-checkout/geography/us_state.rb
Instance Attribute Summary collapse
-
#state ⇒ Object
Returns the value of attribute state.
Instance Method Summary collapse
-
#initialize(state) ⇒ UsState
constructor
A new instance of UsState.
- #to_xml ⇒ Object
Constructor Details
#initialize(state) ⇒ UsState
Returns a new instance of UsState.
7 8 9 |
# File 'lib/google-checkout/geography/us_state.rb', line 7 def initialize(state) @state = state end |
Instance Attribute Details
#state ⇒ Object
Returns the value of attribute state.
5 6 7 |
# File 'lib/google-checkout/geography/us_state.rb', line 5 def state @state end |
Instance Method Details
#to_xml ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/google-checkout/geography/us_state.rb', line 11 def to_xml xml = Builder::XmlMarkup.new xml.tag!('us-state-area') do xml.tag!('state') do xml.text! @state end end end |