Class: MtGox::Lag

Inherits:
Object
  • Object
show all
Defined in:
lib/mtgox/lag.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#lengthObject

Returns the value of attribute length.



5
6
7
# File 'lib/mtgox/lag.rb', line 5

def length
  @length
end

#microsecondsObject

Returns the value of attribute microseconds.



5
6
7
# File 'lib/mtgox/lag.rb', line 5

def microseconds
  @microseconds
end

#secondsObject

Returns the value of attribute seconds.



5
6
7
# File 'lib/mtgox/lag.rb', line 5

def seconds
  @seconds
end

#textObject

Returns the value of attribute text.



5
6
7
# File 'lib/mtgox/lag.rb', line 5

def text
  @text
end