Class: Fugle::Trade Private

Inherits:
Object
  • Object
show all
Defined in:
lib/fugle/trade.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

The trade information

Since:

  • 0.1.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(item) ⇒ Trade

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Trade.

Since:

  • 0.1.0



15
16
17
18
19
20
21
22
# File 'lib/fugle/trade.rb', line 15

def initialize(item)
  @price = item['price']
  @unit = item['unit']
  @order = item['order']
  @volume = item['volume']
  @serial = item['serial']
  @at = DateTime.parse(item['at']) if item['at']
end

Instance Attribute Details

#orderObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0



11
12
13
# File 'lib/fugle/trade.rb', line 11

def order
  @order
end

#priceObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0



11
12
13
# File 'lib/fugle/trade.rb', line 11

def price
  @price
end

#serialObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0



11
12
13
# File 'lib/fugle/trade.rb', line 11

def serial
  @serial
end

#unitObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0



11
12
13
# File 'lib/fugle/trade.rb', line 11

def unit
  @unit
end

#volumeObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0



11
12
13
# File 'lib/fugle/trade.rb', line 11

def volume
  @volume
end