Class: Fixnum
- Inherits:
-
Object
- Object
- Fixnum
- Defined in:
- lib/polyrex-feed-reader.rb
Instance Method Summary collapse
- #days ⇒ Object (also: #day)
- #hours ⇒ Object (also: #hour)
- #minutes ⇒ Object (also: #minute)
- #months ⇒ Object (also: #month)
- #ordinal ⇒ Object
- #seconds ⇒ Object (also: #second)
- #weeks ⇒ Object (also: #week)
Instance Method Details
#days ⇒ Object Also known as: day
19 |
# File 'lib/polyrex-feed-reader.rb', line 19 def days() self * hours * 24 end |
#hours ⇒ Object Also known as: hour
18 |
# File 'lib/polyrex-feed-reader.rb', line 18 def hours() self * seconds * 60 end |
#minutes ⇒ Object Also known as: minute
17 |
# File 'lib/polyrex-feed-reader.rb', line 17 def minutes() self * 60 end |
#months ⇒ Object Also known as: month
21 |
# File 'lib/polyrex-feed-reader.rb', line 21 def months() self * days * 30 end |
#ordinal ⇒ Object
11 12 13 14 |
# File 'lib/polyrex-feed-reader.rb', line 11 def ordinal self.to_s + ( (10...20).include?(self) ? 'th' : %w{ th st nd rd th th th th th th }[self % 10] ) end |
#seconds ⇒ Object Also known as: second
16 |
# File 'lib/polyrex-feed-reader.rb', line 16 def seconds() self end |
#weeks ⇒ Object Also known as: week
20 |
# File 'lib/polyrex-feed-reader.rb', line 20 def weeks() self * days * 7 end |