Class: MtGox::Lag
- Inherits:
-
Object
- Object
- MtGox::Lag
- Defined in:
- lib/mtgox/lag.rb
Instance Attribute Summary collapse
-
#length ⇒ Object
Returns the value of attribute length.
-
#microseconds ⇒ Object
Returns the value of attribute microseconds.
-
#seconds ⇒ Object
Returns the value of attribute seconds.
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(lag = nil, lag_secs = nil, lag_text = nil, length = nil) ⇒ Lag
constructor
A new instance of Lag.
Constructor Details
#initialize(lag = nil, lag_secs = nil, lag_text = nil, length = nil) ⇒ Lag
Returns a new instance of Lag.
7 8 9 10 11 12 |
# File 'lib/mtgox/lag.rb', line 7 def initialize(lag=nil, lag_secs=nil, lag_text=nil, length=nil) self.microseconds = lag.to_i self.seconds = BigDecimal(lag_secs.to_s) self.text = lag_text self.length = length.to_i end |
Instance Attribute Details
#length ⇒ Object
Returns the value of attribute length.
5 6 7 |
# File 'lib/mtgox/lag.rb', line 5 def length @length end |
#microseconds ⇒ Object
Returns the value of attribute microseconds.
5 6 7 |
# File 'lib/mtgox/lag.rb', line 5 def microseconds @microseconds end |
#seconds ⇒ Object
Returns the value of attribute seconds.
5 6 7 |
# File 'lib/mtgox/lag.rb', line 5 def seconds @seconds end |
#text ⇒ Object
Returns the value of attribute text.
5 6 7 |
# File 'lib/mtgox/lag.rb', line 5 def text @text end |