Class: BinanceClient::Coin
- Defined in:
- lib/binance_client/models/coin.rb
Constant Summary collapse
- STR_METHODS =
i[ coin name ].freeze
- DECIMAL_METHODS =
i[ free freeze ipoable ipoing locked storage withdrawing ].freeze
- BOOL_MAP =
{ deposit_all_enable: :deposit_all_enabled?, is_legal_money: :legal_money?, trading: :trading?, withdraw_all_enable: :withdraw_all_enabled?, }.freeze
- METHODS =
(STR_METHODS + DECIMAL_METHODS + BOOL_MAP.keys).freeze
Instance Attribute Summary collapse
-
#raw_hash ⇒ Object
Returns the value of attribute raw_hash.
Instance Method Summary collapse
-
#initialize(**kwargs) ⇒ Coin
constructor
A new instance of Coin.
- #network_list ⇒ Object
Constructor Details
#initialize(**kwargs) ⇒ Coin
Returns a new instance of Coin.
31 32 33 34 35 |
# File 'lib/binance_client/models/coin.rb', line 31 def initialize(**kwargs) kwargs.each do |key, value| self.send("#{key}=", value) end end |
Instance Attribute Details
#raw_hash ⇒ Object
Returns the value of attribute raw_hash.
28 29 30 |
# File 'lib/binance_client/models/coin.rb', line 28 def raw_hash @raw_hash end |
Instance Method Details
#network_list ⇒ Object
63 64 65 66 67 |
# File 'lib/binance_client/models/coin.rb', line 63 def network_list @network_list ||= raw_hash["networkList"].map do |network_hash| Network.new(raw_hash: network_hash) end end |