Class: BinanceClient::BookTicker
- Defined in:
- lib/binance_client/models/book_ticker.rb
Constant Summary collapse
- ATTRIBUTES =
[ :symbol, :bid_price, :bid_qty, :ask_price, :ask_qty ].freeze
Class Method Summary collapse
Class Method Details
.new_from_raw_hash(raw_hash) ⇒ Object
18 19 20 21 22 23 |
# File 'lib/binance_client/models/book_ticker.rb', line 18 def self.new_from_raw_hash(raw_hash) attrs = ATTRIBUTES.each_with_object({}) do |local_attr, hash| hash[local_attr] = raw_hash[local_attr.to_s.camelcase(:lower)] end self.new(attrs) end |