lib/order.rb in ruby-trade-0.1 vs lib/order.rb in ruby-trade-0.2

- old
+ new

@@ -1,20 +1,19 @@ require 'observer' class Order include Observable - attr_reader :id, :local_id, :side, :price, :size, :sent_at, :status + attr_reader :id, :local_id, :side, :size, :sent_at, :status + attr_accessor :price, :status def initialize id, side, price, size @id, @side, @price, @size = id, side, price, size @sent_at = Time.now @cancelled = false @status = :pending_accept - end - def status= new_status - @status = new_status + @price = @price.round 2 end def <=> order if order.price == price @sent_at <=> order.sent_at