Class: FixerApiClient::Currency

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

Constant Summary collapse

BASE_CURRENCY =
'EUR'
BASE_CURRENCY_AMOUNT =
1

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value, symbol, friendly_name) ⇒ Currency

Returns a new instance of Currency.



8
9
10
11
12
13
# File 'lib/fixer_api_client/currency.rb', line 8

def initialize(value, symbol, friendly_name)
  @value = value
  @symbol = symbol
  @friendly_name = friendly_name

end

Instance Attribute Details

#friendly_nameObject (readonly)

Returns the value of attribute friendly_name.



6
7
8
# File 'lib/fixer_api_client/currency.rb', line 6

def friendly_name
  @friendly_name
end

#symbolObject (readonly)

Returns the value of attribute symbol.



6
7
8
# File 'lib/fixer_api_client/currency.rb', line 6

def symbol
  @symbol
end

#valueObject (readonly)

Returns the value of attribute value.



6
7
8
# File 'lib/fixer_api_client/currency.rb', line 6

def value
  @value
end

Instance Method Details

#inspectObject



15
16
17
# File 'lib/fixer_api_client/currency.rb', line 15

def inspect
  "#{value} #{friendly_name}"
end