Class: Vzaar::AccountType
- Inherits:
-
Object
- Object
- Vzaar::AccountType
- Defined in:
- lib/vzaar/account_type.rb
Instance Attribute Summary collapse
-
#bandwidth ⇒ Object
Returns the value of attribute bandwidth.
-
#borderless ⇒ Object
Returns the value of attribute borderless.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#id ⇒ Object
Returns the value of attribute id.
-
#monthly ⇒ Object
Returns the value of attribute monthly.
-
#search_enhancer ⇒ Object
Returns the value of attribute search_enhancer.
-
#title ⇒ Object
Returns the value of attribute title.
-
#version ⇒ Object
Returns the value of attribute version.
-
#xml ⇒ Object
Returns the value of attribute xml.
Instance Method Summary collapse
-
#initialize(xml) ⇒ AccountType
constructor
A new instance of AccountType.
Constructor Details
#initialize(xml) ⇒ AccountType
Returns a new instance of AccountType.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/vzaar/account_type.rb', line 8 def initialize(xml) @xml = xml doc = REXML::Document.new xml @version = doc.elements['account/version'] ? doc.elements['account/version'].text : '' @id = doc.elements['account/account_id'] ? doc.elements['account/account_id'].text : '' @title = doc.elements['account/title'] ? doc.elements['account/title'].text : '' @monthly = doc.elements['account/cost/monthly'] ? doc.elements['account/cost/monthly'].text : '' @currency = doc.elements['account/cost/currency'] ? doc.elements['account/cost/currency'].text : '' @bandwidth = doc.elements['account/bandwidth'] ? doc.elements['account/bandwidth'].text : '' @borderless = doc.elements['account/rights/borderless'] ? doc.elements['account/rights/borderless'].text : '' @search_enhancer = doc.elements['account/rights/searchEnhancer'] ? doc.elements['account/rights/searchEnhancer'].text : '' end |
Instance Attribute Details
#bandwidth ⇒ Object
Returns the value of attribute bandwidth.
5 6 7 |
# File 'lib/vzaar/account_type.rb', line 5 def bandwidth @bandwidth end |
#borderless ⇒ Object
Returns the value of attribute borderless.
5 6 7 |
# File 'lib/vzaar/account_type.rb', line 5 def borderless @borderless end |
#currency ⇒ Object
Returns the value of attribute currency.
5 6 7 |
# File 'lib/vzaar/account_type.rb', line 5 def currency @currency end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/vzaar/account_type.rb', line 5 def id @id end |
#monthly ⇒ Object
Returns the value of attribute monthly.
5 6 7 |
# File 'lib/vzaar/account_type.rb', line 5 def monthly @monthly end |
#search_enhancer ⇒ Object
Returns the value of attribute search_enhancer.
5 6 7 |
# File 'lib/vzaar/account_type.rb', line 5 def search_enhancer @search_enhancer end |
#title ⇒ Object
Returns the value of attribute title.
5 6 7 |
# File 'lib/vzaar/account_type.rb', line 5 def title @title end |
#version ⇒ Object
Returns the value of attribute version.
5 6 7 |
# File 'lib/vzaar/account_type.rb', line 5 def version @version end |
#xml ⇒ Object
Returns the value of attribute xml.
5 6 7 |
# File 'lib/vzaar/account_type.rb', line 5 def xml @xml end |