Class: Duration::Minutes
- Inherits:
-
Object
- Object
- Duration::Minutes
- Defined in:
- lib/Duration/Minutes.rb
Instance Method Summary collapse
- #to_days ⇒ Object
- #to_f ⇒ Object
- #to_hours ⇒ Object
- #to_i ⇒ Object
- #to_microseconds ⇒ Object
- #to_milliseconds ⇒ Object
- #to_minutes ⇒ Object
- #to_months ⇒ Object
- #to_nanoseconds ⇒ Object
- #to_seconds ⇒ Object
- #to_weeks ⇒ Object
Methods included from Relative
Methods included from Common
Instance Method Details
#to_days ⇒ Object
38 39 40 |
# File 'lib/Duration/Minutes.rb', line 38 def to_days to_hours.to_days end |
#to_f ⇒ Object
54 55 56 |
# File 'lib/Duration/Minutes.rb', line 54 def to_f @minutes.to_f end |
#to_hours ⇒ Object
34 35 36 |
# File 'lib/Duration/Minutes.rb', line 34 def to_hours Duration::Hours.new(@minutes / 60r) end |
#to_i ⇒ Object
50 51 52 |
# File 'lib/Duration/Minutes.rb', line 50 def to_i @minutes.to_i end |
#to_microseconds ⇒ Object
18 19 20 |
# File 'lib/Duration/Minutes.rb', line 18 def to_microseconds to_seconds.to_microseconds end |
#to_milliseconds ⇒ Object
22 23 24 |
# File 'lib/Duration/Minutes.rb', line 22 def to_milliseconds to_seconds.to_milliseconds end |
#to_minutes ⇒ Object
30 31 32 |
# File 'lib/Duration/Minutes.rb', line 30 def to_minutes self end |
#to_months ⇒ Object
46 47 48 |
# File 'lib/Duration/Minutes.rb', line 46 def to_months to_hours.to_months end |
#to_nanoseconds ⇒ Object
14 15 16 |
# File 'lib/Duration/Minutes.rb', line 14 def to_nanoseconds to_seconds.to_nanoseconds end |
#to_seconds ⇒ Object
26 27 28 |
# File 'lib/Duration/Minutes.rb', line 26 def to_seconds Duration::Seconds.new(@minutes * 60) end |
#to_weeks ⇒ Object
42 43 44 |
# File 'lib/Duration/Minutes.rb', line 42 def to_weeks to_hours.to_weeks end |