Class: GoogleCheckout::Geography::UsState

Inherits:
Area
  • Object
show all
Defined in:
lib/google-checkout/geography/us_state.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#stateObject

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_xmlObject



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