Sha256: 70bb89cde062a84c17635ef6e50e77370a8a8bb8c8be7f20af91c4d60fc3ceb3

Contents?: true

Size: 297 Bytes

Versions: 10

Compression:

Stored size: 297 Bytes

Contents

require 'mtgox/offer'

module MtGox
  class Order < Offer
    attr_accessor :id, :date

    def initialize(order={})
      self.id     = order['oid']
      self.date   = Time.at(order['date'].to_i)
      self.amount = order['amount'].to_f
      self.price  = order['price'].to_f
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
mtgox-0.8.2 lib/mtgox/order.rb
mtgox-0.8.1 lib/mtgox/order.rb
mtgox-0.8.0 lib/mtgox/order.rb
mtgox-0.7.5 lib/mtgox/order.rb
mtgox-0.7.4 lib/mtgox/order.rb
mtgox-0.7.3 lib/mtgox/order.rb
mt_gox-0.7.3 lib/mtgox/order.rb
mtgox-0.7.2 lib/mtgox/order.rb
mtgox-0.7.1 lib/mtgox/order.rb
mtgox-0.7.0 lib/mtgox/order.rb