Class: Bitstamp::Ticker
Instance Attribute Summary collapse
-
#ask ⇒ Object
Returns the value of attribute ask.
-
#bid ⇒ Object
Returns the value of attribute bid.
-
#high ⇒ Object
Returns the value of attribute high.
-
#last ⇒ Object
Returns the value of attribute last.
-
#low ⇒ Object
Returns the value of attribute low.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
-
#volume ⇒ Object
Returns the value of attribute volume.
Attributes inherited from Model
Class Method Summary collapse
Methods inherited from Model
#attributes, #attributes=, #initialize
Constructor Details
This class inherits a constructor from Bitstamp::Model
Instance Attribute Details
#ask ⇒ Object
Returns the value of attribute ask.
3 4 5 |
# File 'lib/bitstamp/ticker.rb', line 3 def ask @ask end |
#bid ⇒ Object
Returns the value of attribute bid.
3 4 5 |
# File 'lib/bitstamp/ticker.rb', line 3 def bid @bid end |
#high ⇒ Object
Returns the value of attribute high.
3 4 5 |
# File 'lib/bitstamp/ticker.rb', line 3 def high @high end |
#last ⇒ Object
Returns the value of attribute last.
3 4 5 |
# File 'lib/bitstamp/ticker.rb', line 3 def last @last end |
#low ⇒ Object
Returns the value of attribute low.
3 4 5 |
# File 'lib/bitstamp/ticker.rb', line 3 def low @low end |
#timestamp ⇒ Object
Returns the value of attribute timestamp.
3 4 5 |
# File 'lib/bitstamp/ticker.rb', line 3 def @timestamp end |
#volume ⇒ Object
Returns the value of attribute volume.
3 4 5 |
# File 'lib/bitstamp/ticker.rb', line 3 def volume @volume end |
Class Method Details
.from_api ⇒ Object
5 6 7 |
# File 'lib/bitstamp/ticker.rb', line 5 def self.from_api Bitstamp::Helper.parse_object!(Bitstamp::Net.get('/ticker').body_str, self) end |
.method_missing(method, *args) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/bitstamp/ticker.rb', line 9 def self.method_missing method, *args ticker = self.from_api return ticker.send(method) if ticker.respond_to? method super end |