Class: Unichron

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(obj) ⇒ Unichron

Returns a new instance of Unichron.



12
13
14
15
# File 'lib/unichron.rb', line 12

def initialize(obj)

  @r = select_method(obj)
end

Instance Attribute Details

#rObject (readonly)

Returns the value of attribute r.



10
11
12
# File 'lib/unichron.rb', line 10

def r
  @r
end

Instance Method Details

#to_secondsObject



17
18
19
# File 'lib/unichron.rb', line 17

def to_seconds
  @r
end

#to_timeObject



21
22
23
# File 'lib/unichron.rb', line 21

def to_time
  @r.to_time
end