Class: Latinum::ExchangeRate

Inherits:
Object
  • Object
show all
Defined in:
lib/latinum/bank.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(input, output, factor) ⇒ ExchangeRate

Returns a new instance of ExchangeRate.



25
26
27
28
29
# File 'lib/latinum/bank.rb', line 25

def initialize(input, output, factor)
	@input = input
	@output = output
	@factor = factor.to_d
end

Instance Attribute Details

#factorObject (readonly)

Returns the value of attribute factor.



33
34
35
# File 'lib/latinum/bank.rb', line 33

def factor
  @factor
end

#inputObject (readonly)

Returns the value of attribute input.



31
32
33
# File 'lib/latinum/bank.rb', line 31

def input
  @input
end

#outputObject (readonly)

Returns the value of attribute output.



32
33
34
# File 'lib/latinum/bank.rb', line 32

def output
  @output
end