Class: Duration::Hours
Instance Method Summary collapse
- #to_days ⇒ Object
- #to_f ⇒ Object
- #to_hours ⇒ Object
- #to_i ⇒ Object
- #to_milliseconds ⇒ Object
- #to_minutes ⇒ Object
- #to_months ⇒ Object
- #to_seconds ⇒ Object
- #to_weeks ⇒ Object
Methods included from Common
Instance Method Details
#to_days ⇒ Object
28 29 30 |
# File 'lib/Duration/Hours.rb', line 28 def to_days Duration::Days.new(@hours/24) end |
#to_f ⇒ Object
44 45 46 |
# File 'lib/Duration/Hours.rb', line 44 def to_f @hours end |
#to_hours ⇒ Object
24 25 26 |
# File 'lib/Duration/Hours.rb', line 24 def to_hours self end |
#to_i ⇒ Object
40 41 42 |
# File 'lib/Duration/Hours.rb', line 40 def to_i @hours.to_i end |
#to_milliseconds ⇒ Object
12 13 14 |
# File 'lib/Duration/Hours.rb', line 12 def to_milliseconds to_minutes.to_milliseconds end |
#to_minutes ⇒ Object
20 21 22 |
# File 'lib/Duration/Hours.rb', line 20 def to_minutes Duration::Minutes.new(@hours * 60) end |
#to_months ⇒ Object
36 37 38 |
# File 'lib/Duration/Hours.rb', line 36 def to_months to_days.to_months end |
#to_seconds ⇒ Object
16 17 18 |
# File 'lib/Duration/Hours.rb', line 16 def to_seconds to_minutes.to_seconds end |
#to_weeks ⇒ Object
32 33 34 |
# File 'lib/Duration/Hours.rb', line 32 def to_weeks to_days.to_weeks end |