Class: Cryptoexchange::Models::OrderBook
- Inherits:
-
Object
- Object
- Cryptoexchange::Models::OrderBook
- Defined in:
- lib/cryptoexchange/models/order_book.rb
Instance Attribute Summary collapse
-
#asks ⇒ Object
Returns the value of attribute asks.
-
#base ⇒ Object
Returns the value of attribute base.
-
#bids ⇒ Object
Returns the value of attribute bids.
-
#market ⇒ Object
Returns the value of attribute market.
-
#payload ⇒ Object
Returns the value of attribute payload.
-
#target ⇒ Object
Returns the value of attribute target.
-
#timestamp ⇒ Object
Returns the value of attribute timestamp.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ OrderBook
constructor
A new instance of OrderBook.
Constructor Details
#initialize(args = {}) ⇒ OrderBook
Returns a new instance of OrderBook.
7 8 9 10 11 12 13 14 15 |
# File 'lib/cryptoexchange/models/order_book.rb', line 7 def initialize(args = {}) @base = args[:base] @target = args[:target] @market = args[:market] @bids = args[:bids] || [] @asks = args[:asks] || [] @timestamp = args[:timestamp] @payload = args[:payload] end |
Instance Attribute Details
#asks ⇒ Object
Returns the value of attribute asks.
4 5 6 |
# File 'lib/cryptoexchange/models/order_book.rb', line 4 def asks @asks end |
#base ⇒ Object
Returns the value of attribute base.
4 5 6 |
# File 'lib/cryptoexchange/models/order_book.rb', line 4 def base @base end |
#bids ⇒ Object
Returns the value of attribute bids.
4 5 6 |
# File 'lib/cryptoexchange/models/order_book.rb', line 4 def bids @bids end |
#market ⇒ Object
Returns the value of attribute market.
4 5 6 |
# File 'lib/cryptoexchange/models/order_book.rb', line 4 def market @market end |
#payload ⇒ Object
Returns the value of attribute payload.
4 5 6 |
# File 'lib/cryptoexchange/models/order_book.rb', line 4 def payload @payload end |
#target ⇒ Object
Returns the value of attribute target.
4 5 6 |
# File 'lib/cryptoexchange/models/order_book.rb', line 4 def target @target end |
#timestamp ⇒ Object
Returns the value of attribute timestamp.
4 5 6 |
# File 'lib/cryptoexchange/models/order_book.rb', line 4 def @timestamp end |