Class: ExchangeParty::Currency
- Inherits:
-
Object
- Object
- ExchangeParty::Currency
- Defined in:
- lib/exchange_party/currency.rb
Instance Attribute Summary collapse
-
#bank_note_buying ⇒ Object
readonly
Returns the value of attribute bank_note_buying.
-
#bank_note_selling ⇒ Object
readonly
Returns the value of attribute bank_note_selling.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#curreny_name ⇒ Object
readonly
Returns the value of attribute curreny_name.
-
#forex_buying ⇒ Object
readonly
Returns the value of attribute forex_buying.
-
#forex_selling ⇒ Object
readonly
Returns the value of attribute forex_selling.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#rate_announcement_date ⇒ Object
readonly
Returns the value of attribute rate_announcement_date.
Instance Method Summary collapse
-
#initialize(currency_element, attributes) ⇒ Currency
constructor
A new instance of Currency.
Constructor Details
#initialize(currency_element, attributes) ⇒ Currency
Returns a new instance of Currency.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/exchange_party/currency.rb', line 8 def initialize(currency_element, attributes) @name = children_value(currency_element, 3) @code = currency_element.attributes["Kod"].value @curreny_name = children_value(currency_element, 5) @forex_buying = children_value(currency_element, 7) @forex_selling = children_value(currency_element, 9) @bank_note_buying = children_value(currency_element, 11) @bank_note_selling = children_value(currency_element, 13) @rate_announcement_date = attributes["Tarih"] end |
Instance Attribute Details
#bank_note_buying ⇒ Object (readonly)
Returns the value of attribute bank_note_buying.
5 6 7 |
# File 'lib/exchange_party/currency.rb', line 5 def @bank_note_buying end |
#bank_note_selling ⇒ Object (readonly)
Returns the value of attribute bank_note_selling.
5 6 7 |
# File 'lib/exchange_party/currency.rb', line 5 def bank_note_selling @bank_note_selling end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
5 6 7 |
# File 'lib/exchange_party/currency.rb', line 5 def code @code end |
#curreny_name ⇒ Object (readonly)
Returns the value of attribute curreny_name.
5 6 7 |
# File 'lib/exchange_party/currency.rb', line 5 def curreny_name @curreny_name end |
#forex_buying ⇒ Object (readonly)
Returns the value of attribute forex_buying.
5 6 7 |
# File 'lib/exchange_party/currency.rb', line 5 def @forex_buying end |
#forex_selling ⇒ Object (readonly)
Returns the value of attribute forex_selling.
5 6 7 |
# File 'lib/exchange_party/currency.rb', line 5 def forex_selling @forex_selling end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/exchange_party/currency.rb', line 5 def name @name end |
#rate_announcement_date ⇒ Object (readonly)
Returns the value of attribute rate_announcement_date.
5 6 7 |
# File 'lib/exchange_party/currency.rb', line 5 def rate_announcement_date @rate_announcement_date end |