Class: Coinone::Order::LimitOrders
- Inherits:
-
Object
- Object
- Coinone::Order::LimitOrders
- Defined in:
- lib/coinone/order/limit_orders.rb,
lib/coinone/order/limit_orders/limit_order.rb
Defined Under Namespace
Classes: LimitOrder
Instance Attribute Summary collapse
-
#complete_orders ⇒ Object
readonly
Returns the value of attribute complete_orders.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ LimitOrders
constructor
A new instance of LimitOrders.
- #update_response(params = {}) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ LimitOrders
Returns a new instance of LimitOrders.
12 13 14 15 16 17 18 19 20 |
# File 'lib/coinone/order/limit_orders.rb', line 12 def initialize(={}) @result = [:result] || nil @limit_orders = [] update_response() end |
Instance Attribute Details
#complete_orders ⇒ Object (readonly)
Returns the value of attribute complete_orders.
10 11 12 |
# File 'lib/coinone/order/limit_orders.rb', line 10 def complete_orders @complete_orders end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
9 10 11 |
# File 'lib/coinone/order/limit_orders.rb', line 9 def result @result end |
Instance Method Details
#update_response(params = {}) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/coinone/order/limit_orders.rb', line 22 def update_response(params={}) @result = params[:result] if params.has_key? :result if params[:limitOrders].present? @limit_orders = [] params[:limitOrders].each do |limit_order| @limit_orders.push(LimitOrder.new(limit_order)) end end end |