Class: Unichron
- Inherits:
-
Object
- Object
- Unichron
- Defined in:
- lib/unichron.rb
Instance Attribute Summary collapse
-
#r ⇒ Object
readonly
Returns the value of attribute r.
Instance Method Summary collapse
-
#initialize(obj) ⇒ Unichron
constructor
A new instance of Unichron.
- #to_seconds ⇒ Object
- #to_time ⇒ Object
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
#r ⇒ Object (readonly)
Returns the value of attribute r.
10 11 12 |
# File 'lib/unichron.rb', line 10 def r @r end |
Instance Method Details
#to_seconds ⇒ Object
17 18 19 |
# File 'lib/unichron.rb', line 17 def to_seconds @r end |
#to_time ⇒ Object
21 22 23 |
# File 'lib/unichron.rb', line 21 def to_time @r.to_time end |