Class: ExchangerateHost::Configurations

Inherits:
Object
  • Object
show all
Defined in:
lib/exchangerate_host/configurations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfigurations

Returns a new instance of Configurations.



5
6
7
8
# File 'lib/exchangerate_host/configurations.rb', line 5

def initialize
  # Default value can be set here.
  # @places = 2
end

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



3
4
5
# File 'lib/exchangerate_host/configurations.rb', line 3

def amount
  @amount
end

#baseObject

Returns the value of attribute base.



3
4
5
# File 'lib/exchangerate_host/configurations.rb', line 3

def base
  @base
end

#dateObject

Returns the value of attribute date.



3
4
5
# File 'lib/exchangerate_host/configurations.rb', line 3

def date
  @date
end

#end_dateObject

Returns the value of attribute end_date.



3
4
5
# File 'lib/exchangerate_host/configurations.rb', line 3

def end_date
  @end_date
end

#formatObject

Returns the value of attribute format.



3
4
5
# File 'lib/exchangerate_host/configurations.rb', line 3

def format
  @format
end

#fromObject

Returns the value of attribute from.



3
4
5
# File 'lib/exchangerate_host/configurations.rb', line 3

def from
  @from
end

#placesObject

Returns the value of attribute places.



3
4
5
# File 'lib/exchangerate_host/configurations.rb', line 3

def places
  @places
end

#start_dateObject

Returns the value of attribute start_date.



3
4
5
# File 'lib/exchangerate_host/configurations.rb', line 3

def start_date
  @start_date
end

#symbolsObject

Returns the value of attribute symbols.



3
4
5
# File 'lib/exchangerate_host/configurations.rb', line 3

def symbols
  @symbols
end

#toObject

Returns the value of attribute to.



3
4
5
# File 'lib/exchangerate_host/configurations.rb', line 3

def to
  @to
end

Instance Method Details

#to_options_hashObject



10
11
12
13
14
# File 'lib/exchangerate_host/configurations.rb', line 10

def to_options_hash
  self.instance_variables.map do |var|
    [var[1..-1].to_sym, self.instance_variable_get(var)]
  end.to_h
end