Class: Cryptoexchange::Models::OrderBook

Inherits:
Object
  • Object
show all
Defined in:
lib/cryptoexchange/models/order_book.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#asksObject

Returns the value of attribute asks.



4
5
6
# File 'lib/cryptoexchange/models/order_book.rb', line 4

def asks
  @asks
end

#baseObject

Returns the value of attribute base.



4
5
6
# File 'lib/cryptoexchange/models/order_book.rb', line 4

def base
  @base
end

#bidsObject

Returns the value of attribute bids.



4
5
6
# File 'lib/cryptoexchange/models/order_book.rb', line 4

def bids
  @bids
end

#marketObject

Returns the value of attribute market.



4
5
6
# File 'lib/cryptoexchange/models/order_book.rb', line 4

def market
  @market
end

#payloadObject

Returns the value of attribute payload.



4
5
6
# File 'lib/cryptoexchange/models/order_book.rb', line 4

def payload
  @payload
end

#targetObject

Returns the value of attribute target.



4
5
6
# File 'lib/cryptoexchange/models/order_book.rb', line 4

def target
  @target
end

#timestampObject

Returns the value of attribute timestamp.



4
5
6
# File 'lib/cryptoexchange/models/order_book.rb', line 4

def timestamp
  @timestamp
end