Class: Bibox::Models::Asset
Constant Summary collapse
- MAPPING =
{ id: :string, symbol: :string, icon_url: :string, describe_url: :string, name: :string, enable_withdraw: :boolean, enable_deposit: :boolean, confirm_count: :integer, total_balance: :float, balance: :float, freeze: :float, btc_value: :float, cny_value: :float, usd_value: :float }
Instance Method Summary collapse
-
#initialize(hash) ⇒ Asset
constructor
A new instance of Asset.
Methods inherited from Base
Constructor Details
#initialize(hash) ⇒ Asset
Returns a new instance of Asset.
21 22 23 24 25 |
# File 'lib/bibox/models/asset.rb', line 21 def initialize(hash) super(hash) self.symbol = hash.fetch("coin_symbol", nil) if self.symbol.to_s.empty? && hash.has_key?("coin_symbol") end |