Class: Flashboy::Order

Inherits:
Object
  • Object
show all
Defined in:
lib/flashboy/order.rb

Direct Known Subclasses

Ask, Bid

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Order

Returns a new instance of Order.



5
6
7
8
# File 'lib/flashboy/order.rb', line 5

def initialize(attrs = {})
  @price = attrs[:price].to_s.to_f
  @amount = attrs[:amount].to_s.to_f
end

Instance Attribute Details

#amountObject (readonly)

Returns the value of attribute amount.



3
4
5
# File 'lib/flashboy/order.rb', line 3

def amount
  @amount
end

#priceObject (readonly)

Returns the value of attribute price.



3
4
5
# File 'lib/flashboy/order.rb', line 3

def price
  @price
end

#typeObject (readonly)

Returns the value of attribute type.



3
4
5
# File 'lib/flashboy/order.rb', line 3

def type
  @type
end