Class: Bittrex::Summary
- Inherits:
-
Object
- Object
- Bittrex::Summary
- Defined in:
- lib/bittrex/summary.rb
Instance Attribute Summary collapse
-
#base_volume ⇒ Object
(also: #base_vol)
readonly
Returns the value of attribute base_volume.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#high ⇒ Object
readonly
Returns the value of attribute high.
-
#last ⇒ Object
readonly
Returns the value of attribute last.
-
#low ⇒ Object
readonly
Returns the value of attribute low.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
-
#volume ⇒ Object
(also: #vol)
readonly
Returns the value of attribute volume.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Summary
constructor
A new instance of Summary.
Constructor Details
#initialize(attrs = {}) ⇒ Summary
Returns a new instance of Summary.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/bittrex/summary.rb', line 8 def initialize(attrs = {}) @name = attrs['MarketName'] @high = attrs['High'] @low = attrs['Low'] @volume = attrs['Volume'] @last = attrs['Last'] @base_volume = attrs['BaseVolume'] @raw = attrs @created_at = Time.parse(attrs['TimeStamp']) end |
Instance Attribute Details
#base_volume ⇒ Object (readonly) Also known as: base_vol
Returns the value of attribute base_volume.
3 4 5 |
# File 'lib/bittrex/summary.rb', line 3 def base_volume @base_volume end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
3 4 5 |
# File 'lib/bittrex/summary.rb', line 3 def created_at @created_at end |
#high ⇒ Object (readonly)
Returns the value of attribute high.
3 4 5 |
# File 'lib/bittrex/summary.rb', line 3 def high @high end |
#last ⇒ Object (readonly)
Returns the value of attribute last.
3 4 5 |
# File 'lib/bittrex/summary.rb', line 3 def last @last end |
#low ⇒ Object (readonly)
Returns the value of attribute low.
3 4 5 |
# File 'lib/bittrex/summary.rb', line 3 def low @low end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/bittrex/summary.rb', line 3 def name @name end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
3 4 5 |
# File 'lib/bittrex/summary.rb', line 3 def raw @raw end |
#volume ⇒ Object (readonly) Also known as: vol
Returns the value of attribute volume.
3 4 5 |
# File 'lib/bittrex/summary.rb', line 3 def volume @volume end |
Class Method Details
.all ⇒ Object
19 20 21 |
# File 'lib/bittrex/summary.rb', line 19 def self.all client.get('public/getmarketsummaries').map{|data| new(data) } end |