Class: Timeprice::MetadataSnapshot
- Inherits:
-
Data
- Object
- Data
- Timeprice::MetadataSnapshot
- Defined in:
- lib/timeprice/metadata_snapshot.rb
Overview
Frozen value object describing the bundled dataset: version, refresh date, country list with CPI ranges, currency list with display names, and FX coverage. Replaces the previous Hash return shape on metadata.
‘[]`, `to_h`, and `to_json` are kept compatible with the old Hash interface so downstream consumers (the website, this gem’s specs) don’t need a coordinated rewrite.
Instance Attribute Summary collapse
-
#countries ⇒ Object
readonly
Returns the value of attribute countries.
-
#currencies ⇒ Object
readonly
Returns the value of attribute currencies.
-
#fx ⇒ Object
readonly
Returns the value of attribute fx.
-
#generated_at ⇒ Object
readonly
Returns the value of attribute generated_at.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
Instance Attribute Details
#countries ⇒ Object (readonly)
Returns the value of attribute countries
14 15 16 |
# File 'lib/timeprice/metadata_snapshot.rb', line 14 def countries @countries end |
#currencies ⇒ Object (readonly)
Returns the value of attribute currencies
14 15 16 |
# File 'lib/timeprice/metadata_snapshot.rb', line 14 def currencies @currencies end |
#fx ⇒ Object (readonly)
Returns the value of attribute fx
14 15 16 |
# File 'lib/timeprice/metadata_snapshot.rb', line 14 def fx @fx end |
#generated_at ⇒ Object (readonly)
Returns the value of attribute generated_at
14 15 16 |
# File 'lib/timeprice/metadata_snapshot.rb', line 14 def generated_at @generated_at end |
#version ⇒ Object (readonly)
Returns the value of attribute version
14 15 16 |
# File 'lib/timeprice/metadata_snapshot.rb', line 14 def version @version end |
Instance Method Details
#[](key) ⇒ Object
15 16 17 |
# File 'lib/timeprice/metadata_snapshot.rb', line 15 def [](key) to_h[key] end |
#to_json(*args) ⇒ Object
19 20 21 |
# File 'lib/timeprice/metadata_snapshot.rb', line 19 def to_json(*args) to_h.to_json(*args) end |