Class: Flashboy::Order
- Inherits:
-
Object
- Object
- Flashboy::Order
- Defined in:
- lib/flashboy/order.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#price ⇒ Object
readonly
Returns the value of attribute price.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Order
constructor
A new instance of Order.
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
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
3 4 5 |
# File 'lib/flashboy/order.rb', line 3 def amount @amount end |
#price ⇒ Object (readonly)
Returns the value of attribute price.
3 4 5 |
# File 'lib/flashboy/order.rb', line 3 def price @price end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
3 4 5 |
# File 'lib/flashboy/order.rb', line 3 def type @type end |