Class: Duration::Days
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/Days.rb', line 28 def to_days self end |
#to_f ⇒ Object
44 45 46 |
# File 'lib/Duration/Days.rb', line 44 def to_f @days end |
#to_hours ⇒ Object
24 25 26 |
# File 'lib/Duration/Days.rb', line 24 def to_hours Duration::Hours.new(@days * 24) end |
#to_i ⇒ Object
40 41 42 |
# File 'lib/Duration/Days.rb', line 40 def to_i @days.to_i end |
#to_milliseconds ⇒ Object
12 13 14 |
# File 'lib/Duration/Days.rb', line 12 def to_milliseconds to_hours.to_milliseconds end |
#to_minutes ⇒ Object
20 21 22 |
# File 'lib/Duration/Days.rb', line 20 def to_minutes to_hours.to_minutes end |
#to_months ⇒ Object
36 37 38 |
# File 'lib/Duration/Days.rb', line 36 def to_months to_weeks.to_months end |
#to_seconds ⇒ Object
16 17 18 |
# File 'lib/Duration/Days.rb', line 16 def to_seconds to_hours.to_seconds end |