Class: ISO8601::Minutes
- Inherits:
-
Object
- Object
- ISO8601::Minutes
- Includes:
- Atomic
- Defined in:
- lib/iso8601/minutes.rb
Overview
The Minutes atom in a Duration
Constant Summary collapse
- AVERAGE_FACTOR =
60
Instance Attribute Summary
Attributes included from Atomic
Instance Method Summary collapse
-
#factor ⇒ Numeric
The Minute factor.
-
#initialize(atom) ⇒ Minutes
constructor
A new instance of Minutes.
-
#symbol ⇒ Symbol
The atom symbol.
-
#to_seconds ⇒ Numeric
The amount of seconds.
Methods included from Atomic
#<=>, #eql?, #hash, #to_f, #to_i, #to_s, #valid_atom?, #valid_base?, #value
Constructor Details
#initialize(atom) ⇒ Minutes
Returns a new instance of Minutes.
13 14 15 16 17 |
# File 'lib/iso8601/minutes.rb', line 13 def initialize(atom) valid_atom?(atom) @atom = atom end |
Instance Method Details
#factor ⇒ Numeric
The Minute factor
23 24 25 |
# File 'lib/iso8601/minutes.rb', line 23 def factor AVERAGE_FACTOR end |
#symbol ⇒ Symbol
The atom symbol.
39 40 41 |
# File 'lib/iso8601/minutes.rb', line 39 def symbol :M end |
#to_seconds ⇒ Numeric
The amount of seconds
31 32 33 |
# File 'lib/iso8601/minutes.rb', line 31 def to_seconds AVERAGE_FACTOR * atom end |