Class: RMarket::Order
- Inherits:
-
Object
- Object
- RMarket::Order
- Defined in:
- lib/rmarket/order.rb
Instance Attribute Summary collapse
-
#asset_label ⇒ Object
readonly
Returns the value of attribute asset_label.
-
#price ⇒ Object
readonly
Returns the value of attribute price.
-
#quantity ⇒ Object
Returns the value of attribute quantity.
-
#trader ⇒ Object
readonly
Returns the value of attribute trader.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type, price, trader = nil, quantity = 1, asset_label = "") ⇒ Order
constructor
A new instance of Order.
Constructor Details
#initialize(type, price, trader = nil, quantity = 1, asset_label = "") ⇒ Order
Returns a new instance of Order.
6 7 8 |
# File 'lib/rmarket/order.rb', line 6 def initialize(type, price, trader=nil, quantity=1, asset_label="") @type, @price, @trader, @quantity, @asset_label = type, price, trader, quantity, asset_label end |
Instance Attribute Details
#asset_label ⇒ Object (readonly)
Returns the value of attribute asset_label.
3 4 5 |
# File 'lib/rmarket/order.rb', line 3 def asset_label @asset_label end |
#price ⇒ Object (readonly)
Returns the value of attribute price.
3 4 5 |
# File 'lib/rmarket/order.rb', line 3 def price @price end |
#quantity ⇒ Object
Returns the value of attribute quantity.
4 5 6 |
# File 'lib/rmarket/order.rb', line 4 def quantity @quantity end |
#trader ⇒ Object (readonly)
Returns the value of attribute trader.
3 4 5 |
# File 'lib/rmarket/order.rb', line 3 def trader @trader end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/rmarket/order.rb', line 3 def type @type end |