Class: IbRubyProxy::Client::Ib::HistoricalTick
- Inherits:
-
Struct
- Object
- Struct
- IbRubyProxy::Client::Ib::HistoricalTick
- Defined in:
- lib/ib_ruby_proxy/client/ib/historical_tick.rb
Instance Attribute Summary collapse
-
#price ⇒ Object
Returns the value of attribute price.
-
#size ⇒ Object
Returns the value of attribute size.
-
#time ⇒ Object
Returns the value of attribute time.
Instance Method Summary collapse
-
#initialize(time: nil, price: 0, size: nil) ⇒ HistoricalTick
constructor
A new instance of HistoricalTick.
- #to_ib ⇒ Object
Constructor Details
#initialize(time: nil, price: 0, size: nil) ⇒ HistoricalTick
Returns a new instance of HistoricalTick.
9 10 11 12 13 |
# File 'lib/ib_ruby_proxy/client/ib/historical_tick.rb', line 9 def initialize(time: nil, price: 0, size: nil) self.time = time self.price = price self.size = size end |
Instance Attribute Details
#price ⇒ Object
Returns the value of attribute price
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/historical_tick.rb', line 8 def price @price end |
#size ⇒ Object
Returns the value of attribute size
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/historical_tick.rb', line 8 def size @size end |
#time ⇒ Object
Returns the value of attribute time
8 9 10 |
# File 'lib/ib_ruby_proxy/client/ib/historical_tick.rb', line 8 def time @time end |
Instance Method Details
#to_ib ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/ib_ruby_proxy/client/ib/historical_tick.rb', line 15 def to_ib ib_object = Java::ComIbClient::HistoricalTick.new ib_object.time(time).to_java ib_object.price(price).to_java ib_object.size(size).to_java ib_object end |