Class: BaaChan::Trade

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(operation, ticker, quantity, price) ⇒ Trade

Returns a new instance of Trade.



7
8
9
10
11
12
# File 'lib/baa_chan/trade.rb', line 7

def initialize(operation, ticker, quantity, price)
  @operation = operation
  @ticker = ticker
  @quantity = quantity
  @price = price
end

Instance Attribute Details

#operationObject

Returns the value of attribute operation.



5
6
7
# File 'lib/baa_chan/trade.rb', line 5

def operation
  @operation
end

#priceObject

Returns the value of attribute price.



5
6
7
# File 'lib/baa_chan/trade.rb', line 5

def price
  @price
end

#quantityObject

Returns the value of attribute quantity.



5
6
7
# File 'lib/baa_chan/trade.rb', line 5

def quantity
  @quantity
end

#tickerObject

Returns the value of attribute ticker.



5
6
7
# File 'lib/baa_chan/trade.rb', line 5

def ticker
  @ticker
end