Class: Fugle::Intraday::Meta::Price Private
- Inherits:
-
Object
- Object
- Fugle::Intraday::Meta::Price
- Defined in:
- lib/fugle/intraday/meta.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #currency ⇒ Object readonly private
- #high_limit ⇒ Object readonly private
- #low_limit ⇒ Object readonly private
- #reference ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(data) ⇒ Price
constructor
private
A new instance of Price.
-
#to_h ⇒ Hash
private
Convert to Hash.
-
#to_json(*args) ⇒ String
private
Convert to JSON.
Constructor Details
#initialize(data) ⇒ Price
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Price.
98 99 100 101 102 103 |
# File 'lib/fugle/intraday/meta.rb', line 98 def initialize(data) @reference = data['priceReference'] @high_limit = data['priceHighLimit'] @low_limit = data['priceLowLimit'] @currency = data['currency'] end |
Instance Attribute Details
#currency ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
94 95 96 |
# File 'lib/fugle/intraday/meta.rb', line 94 def currency @currency end |
#high_limit ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
94 95 96 |
# File 'lib/fugle/intraday/meta.rb', line 94 def high_limit @high_limit end |
#low_limit ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
94 95 96 |
# File 'lib/fugle/intraday/meta.rb', line 94 def low_limit @low_limit end |
#reference ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
94 95 96 |
# File 'lib/fugle/intraday/meta.rb', line 94 def reference @reference end |
Instance Method Details
#to_h ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Convert to Hash
111 112 113 114 115 116 117 118 |
# File 'lib/fugle/intraday/meta.rb', line 111 def to_h { reference: @reference, high_limit: @high_limit, low_limit: @low_limit, currency: @currency } end |
#to_json(*args) ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Convert to JSON
126 127 128 |
# File 'lib/fugle/intraday/meta.rb', line 126 def to_json(*args) to_h.to_json(*args) end |