Class: Timeprice::InflationResult
- Inherits:
-
Data
- Object
- Data
- Timeprice::InflationResult
- Defined in:
- lib/timeprice/inflation.rb,
lib/timeprice/cli.rb
Overview
Value object returned by Inflation.adjust.
granularity is one of:
:monthly — both ends resolved on monthly data
:annual — at least one end resolved on annual data
:annual_from_monthly_avg — at least one end was an annual request resolved
by averaging 12 months of monthly data
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#from ⇒ Object
readonly
Returns the value of attribute from.
-
#from_index ⇒ Object
readonly
Returns the value of attribute from_index.
-
#granularity ⇒ Object
readonly
Returns the value of attribute granularity.
-
#original_amount ⇒ Object
readonly
Returns the value of attribute original_amount.
-
#to ⇒ Object
readonly
Returns the value of attribute to.
-
#to_index ⇒ Object
readonly
Returns the value of attribute to_index.
Instance Method Summary collapse
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount
14 15 16 |
# File 'lib/timeprice/inflation.rb', line 14 def amount @amount end |
#country ⇒ Object (readonly)
Returns the value of attribute country
14 15 16 |
# File 'lib/timeprice/inflation.rb', line 14 def country @country end |
#from ⇒ Object (readonly)
Returns the value of attribute from
14 15 16 |
# File 'lib/timeprice/inflation.rb', line 14 def from @from end |
#from_index ⇒ Object (readonly)
Returns the value of attribute from_index
14 15 16 |
# File 'lib/timeprice/inflation.rb', line 14 def from_index @from_index end |
#granularity ⇒ Object (readonly)
Returns the value of attribute granularity
14 15 16 |
# File 'lib/timeprice/inflation.rb', line 14 def granularity @granularity end |
#original_amount ⇒ Object (readonly)
Returns the value of attribute original_amount
14 15 16 |
# File 'lib/timeprice/inflation.rb', line 14 def original_amount @original_amount end |
#to ⇒ Object (readonly)
Returns the value of attribute to
14 15 16 |
# File 'lib/timeprice/inflation.rb', line 14 def to @to end |
#to_index ⇒ Object (readonly)
Returns the value of attribute to_index
14 15 16 |
# File 'lib/timeprice/inflation.rb', line 14 def to_index @to_index end |
Instance Method Details
#country_currency_label ⇒ Object
206 207 208 |
# File 'lib/timeprice/cli.rb', line 206 def country_currency_label Supported.currency_for_country(country) || country.to_s.upcase end |