Fix standard ruby style issues
This commit is contained in:
parent
e92a3b1102
commit
986fc47c73
1
Gemfile
1
Gemfile
@ -10,4 +10,3 @@ gem "rake", "~> 13.0"
|
||||
gem "rspec", "~> 3.0"
|
||||
|
||||
gem "standard", "~> 1.3"
|
||||
|
||||
|
@ -14,7 +14,7 @@ module Rex
|
||||
def pop_first_order
|
||||
order = @first_order
|
||||
@first_order = @first_order.next_order
|
||||
if @first_order == nil
|
||||
if @first_order.nil?
|
||||
@last_order = nil
|
||||
end
|
||||
|
||||
@ -25,11 +25,10 @@ module Rex
|
||||
def add_order(order)
|
||||
if empty?
|
||||
@first_order = order
|
||||
@last_order = order
|
||||
else
|
||||
@last_order.next_order = order
|
||||
@last_order = order
|
||||
end
|
||||
@last_order = order
|
||||
@order_count += 1
|
||||
end
|
||||
|
||||
|
@ -2,7 +2,7 @@ require "rbtree"
|
||||
|
||||
module Rex
|
||||
class OrderBook
|
||||
def initialize()
|
||||
def initialize
|
||||
@sell_side = tree_with_limit_default
|
||||
@buy_side = tree_with_limit_default
|
||||
end
|
||||
@ -17,7 +17,6 @@ module Rex
|
||||
side[order.price].add_order(order)
|
||||
end
|
||||
|
||||
|
||||
def cancel_order(order_id)
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user