Class: BTCT::Quote
- Inherits:
-
Object
- Object
- BTCT::Quote
- Defined in:
- lib/btct/quote.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#exchange ⇒ Object
readonly
Returns the value of attribute exchange.
-
#price ⇒ Object
readonly
Returns the value of attribute price.
Instance Method Summary collapse
-
#initialize(price, amount, exchange) ⇒ Quote
constructor
A new instance of Quote.
Constructor Details
#initialize(price, amount, exchange) ⇒ Quote
Returns a new instance of Quote.
5 6 7 |
# File 'lib/btct/quote.rb', line 5 def initialize(price, amount, exchange) @price, @amount, @exchange = price.to_f, amount.to_f, exchange end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
3 4 5 |
# File 'lib/btct/quote.rb', line 3 def amount @amount end |
#exchange ⇒ Object (readonly)
Returns the value of attribute exchange.
3 4 5 |
# File 'lib/btct/quote.rb', line 3 def exchange @exchange end |
#price ⇒ Object (readonly)
Returns the value of attribute price.
3 4 5 |
# File 'lib/btct/quote.rb', line 3 def price @price end |