Class: ExchangeParty::Currency

Inherits:
Object
  • Object
show all
Defined in:
lib/exchange_party/currency.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_buyingObject (readonly)

Returns the value of attribute bank_note_buying.



5
6
7
# File 'lib/exchange_party/currency.rb', line 5

def bank_note_buying
  @bank_note_buying
end

#bank_note_sellingObject (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

#codeObject (readonly)

Returns the value of attribute code.



5
6
7
# File 'lib/exchange_party/currency.rb', line 5

def code
  @code
end

#curreny_nameObject (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_buyingObject (readonly)

Returns the value of attribute forex_buying.



5
6
7
# File 'lib/exchange_party/currency.rb', line 5

def forex_buying
  @forex_buying
end

#forex_sellingObject (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

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/exchange_party/currency.rb', line 5

def name
  @name
end

#rate_announcement_dateObject (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