Class: CurrencyLayerApi::Conversion

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

Overview

Conversion Class for CurrencyLayerApi

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from_code:, to_code:, value:, date: nil) ⇒ Conversion

Returns a new instance of Conversion.



8
9
10
11
12
13
# File 'lib/currency_layer_api/conversion.rb', line 8

def initialize(from_code:, to_code:, value:, date: nil)
  @from_code = from_code
  @to_code = to_code
  @value = value
  @date = date
end

Instance Attribute Details

#dateObject (readonly)

Returns the value of attribute date.



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

def date
  @date
end

#from_codeObject (readonly)

Returns the value of attribute from_code.



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

def from_code
  @from_code
end

#to_codeObject (readonly)

Returns the value of attribute to_code.



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

def to_code
  @to_code
end

#valueObject (readonly)

Returns the value of attribute value.



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

def value
  @value
end