Class: Btce::Types::Trade
- Inherits:
-
Object
- Object
- Btce::Types::Trade
- Defined in:
- lib/btce/types.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#is_your_order ⇒ Object
readonly
Returns the value of attribute is_your_order.
-
#order_id ⇒ Object
readonly
Returns the value of attribute order_id.
-
#pair ⇒ Object
readonly
Returns the value of attribute pair.
-
#rate ⇒ Object
readonly
Returns the value of attribute rate.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(id, data) ⇒ Trade
constructor
from Response.return.
- #to_s ⇒ Object
Constructor Details
#initialize(id, data) ⇒ Trade
from Response.return
100 101 102 103 104 105 |
# File 'lib/btce/types.rb', line 100 def initialize(id, data) # from Response.return data.delete('funds') @values = data @values[:id] = id @values.each { |name, value| instance_variable_set("@#{name}", value) } end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
98 99 100 |
# File 'lib/btce/types.rb', line 98 def amount @amount end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
98 99 100 |
# File 'lib/btce/types.rb', line 98 def id @id end |
#is_your_order ⇒ Object (readonly)
Returns the value of attribute is_your_order.
98 99 100 |
# File 'lib/btce/types.rb', line 98 def is_your_order @is_your_order end |
#order_id ⇒ Object (readonly)
Returns the value of attribute order_id.
98 99 100 |
# File 'lib/btce/types.rb', line 98 def order_id @order_id end |
#pair ⇒ Object (readonly)
Returns the value of attribute pair.
98 99 100 |
# File 'lib/btce/types.rb', line 98 def pair @pair end |
#rate ⇒ Object (readonly)
Returns the value of attribute rate.
98 99 100 |
# File 'lib/btce/types.rb', line 98 def rate @rate end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
98 99 100 |
# File 'lib/btce/types.rb', line 98 def @timestamp end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
98 99 100 |
# File 'lib/btce/types.rb', line 98 def type @type end |
Instance Method Details
#to_s ⇒ Object
107 108 109 |
# File 'lib/btce/types.rb', line 107 def to_s @values.to_s end |