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