Class: IbRubyProxy::Client::Ib::HistoricalTickLast

Inherits:
Struct
  • Object
show all
Defined in:
lib/ib_ruby_proxy/client/ib/historical_tick_last.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(time: nil, tick_attrib_last: nil, price: 0, size: nil, exchange: nil, special_conditions: nil) ⇒ HistoricalTickLast

Returns a new instance of HistoricalTickLast.



9
10
11
12
13
14
15
16
# File 'lib/ib_ruby_proxy/client/ib/historical_tick_last.rb', line 9

def initialize(time: nil, tick_attrib_last: nil, price: 0, size: nil, exchange: nil, special_conditions: nil)
  self.time = time
  self.tick_attrib_last = tick_attrib_last
  self.price = price
  self.size = size
  self.exchange = exchange
  self.special_conditions = special_conditions
end

Instance Attribute Details

#exchangeObject

Returns the value of attribute exchange

Returns:

  • (Object)

    the current value of exchange



8
9
10
# File 'lib/ib_ruby_proxy/client/ib/historical_tick_last.rb', line 8

def exchange
  @exchange
end

#priceObject

Returns the value of attribute price

Returns:

  • (Object)

    the current value of price



8
9
10
# File 'lib/ib_ruby_proxy/client/ib/historical_tick_last.rb', line 8

def price
  @price
end

#sizeObject

Returns the value of attribute size

Returns:

  • (Object)

    the current value of size



8
9
10
# File 'lib/ib_ruby_proxy/client/ib/historical_tick_last.rb', line 8

def size
  @size
end

#special_conditionsObject

Returns the value of attribute special_conditions

Returns:

  • (Object)

    the current value of special_conditions



8
9
10
# File 'lib/ib_ruby_proxy/client/ib/historical_tick_last.rb', line 8

def special_conditions
  @special_conditions
end

#tick_attrib_lastObject

Returns the value of attribute tick_attrib_last

Returns:

  • (Object)

    the current value of tick_attrib_last



8
9
10
# File 'lib/ib_ruby_proxy/client/ib/historical_tick_last.rb', line 8

def tick_attrib_last
  @tick_attrib_last
end

#timeObject

Returns the value of attribute time

Returns:

  • (Object)

    the current value of time



8
9
10
# File 'lib/ib_ruby_proxy/client/ib/historical_tick_last.rb', line 8

def time
  @time
end

Instance Method Details

#to_ibObject



18
19
20
21
22
23
24
25
26
27
28
# File 'lib/ib_ruby_proxy/client/ib/historical_tick_last.rb', line 18

def to_ib
  ib_object = Java::ComIbClient::HistoricalTickLast.new
  ib_object.time(time).to_java
  ib_object.tickAttribLast(tick_attrib_last).to_java
  ib_object.price(price).to_java
  ib_object.size(size).to_java
  ib_object.exchange(exchange).to_java
  ib_object.specialConditions(special_conditions).to_java

  ib_object
end