Class: Buda::Market
- Inherits:
-
Object
- Object
- Buda::Market
- Defined in:
- lib/buda/resources/market.rb
Overview
for handling the total balance
Instance Attribute Summary collapse
-
#base_currency ⇒ Object
readonly
Returns the value of attribute base_currency.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#minimum_order_amount ⇒ Object
readonly
Returns the value of attribute minimum_order_amount.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#quote_currency ⇒ Object
readonly
Returns the value of attribute quote_currency.
-
#ticker ⇒ Object
readonly
Returns the value of attribute ticker.
Instance Method Summary collapse
-
#initialize(id:, name:, base_currency:, quote_currency:, minimum_order_amount:) ⇒ Market
constructor
A new instance of Market.
- #inspect ⇒ Object
- #set_ticker(**ticker) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(id:, name:, base_currency:, quote_currency:, minimum_order_amount:) ⇒ Market
Returns a new instance of Market.
10 11 12 13 14 15 16 |
# File 'lib/buda/resources/market.rb', line 10 def initialize(id:, name:, base_currency:, quote_currency:, minimum_order_amount:, **) @id = id @name = name @base_currency = base_currency @quote_currency = quote_currency @minimum_order_amount = minimum_order_amount end |
Instance Attribute Details
#base_currency ⇒ Object (readonly)
Returns the value of attribute base_currency.
8 9 10 |
# File 'lib/buda/resources/market.rb', line 8 def base_currency @base_currency end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
8 9 10 |
# File 'lib/buda/resources/market.rb', line 8 def id @id end |
#minimum_order_amount ⇒ Object (readonly)
Returns the value of attribute minimum_order_amount.
8 9 10 |
# File 'lib/buda/resources/market.rb', line 8 def minimum_order_amount @minimum_order_amount end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/buda/resources/market.rb', line 8 def name @name end |
#quote_currency ⇒ Object (readonly)
Returns the value of attribute quote_currency.
8 9 10 |
# File 'lib/buda/resources/market.rb', line 8 def quote_currency @quote_currency end |
#ticker ⇒ Object (readonly)
Returns the value of attribute ticker.
8 9 10 |
# File 'lib/buda/resources/market.rb', line 8 def ticker @ticker end |
Instance Method Details
#inspect ⇒ Object
26 27 28 |
# File 'lib/buda/resources/market.rb', line 26 def inspect "<Market #{@name} (#{@id})>" end |
#set_ticker(**ticker) ⇒ Object
18 19 20 |
# File 'lib/buda/resources/market.rb', line 18 def set_ticker(**ticker) @ticker = Buda::Ticker.new(**ticker) end |
#to_s ⇒ Object
22 23 24 |
# File 'lib/buda/resources/market.rb', line 22 def to_s "#{@name} (#{@id})" end |