Class: Coinone::Public::Orderbook
- Inherits:
-
Object
- Object
- Coinone::Public::Orderbook
- Defined in:
- lib/coinone/public/orderbook.rb,
lib/coinone/public/orderbook/order.rb,
lib/coinone/public/orderbook/orders.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#ask ⇒ Object
readonly
Returns the value of attribute ask.
-
#bid ⇒ Object
readonly
Returns the value of attribute bid.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Orderbook
constructor
A new instance of Orderbook.
Constructor Details
#initialize(params = {}) ⇒ Orderbook
Returns a new instance of Orderbook.
8 9 10 11 12 13 |
# File 'lib/coinone/public/orderbook.rb', line 8 def initialize(params={}) @ask = Orders.new(params[:ask]) || [] @bid = Orders.new(params[:bid]) || [] = params[:timestamp].to_i || nil @currency= params[:currency] || nil end |
Instance Attribute Details
#ask ⇒ Object (readonly)
Returns the value of attribute ask.
6 7 8 |
# File 'lib/coinone/public/orderbook.rb', line 6 def ask @ask end |
#bid ⇒ Object (readonly)
Returns the value of attribute bid.
6 7 8 |
# File 'lib/coinone/public/orderbook.rb', line 6 def bid @bid end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
6 7 8 |
# File 'lib/coinone/public/orderbook.rb', line 6 def currency @currency end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
6 7 8 |
# File 'lib/coinone/public/orderbook.rb', line 6 def end |