Class: CurrencyLayerApi::Currency

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

Overview

Currency Class for CurrencyLayerApi

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code:, name:) ⇒ Currency

Returns a new instance of Currency.



8
9
10
11
# File 'lib/currency_layer_api/currency.rb', line 8

def initialize(code:, name:)
  @code = code
  @name = name
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



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

def code
  @code
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end