Top Level Namespace
Defined Under Namespace
Modules: Mongoid, RubyDuration
Classes: Day, Days, Decade, Decades, Duration, Hour, Hours, Minute, Minutes, Month, Months, Numeric, Second, Seconds, Week, Weeks, Year, Years
Instance Method Summary
collapse
Instance Method Details
#am ⇒ Object
2
3
4
5
|
# File 'lib/duration/fixnum.rb', line 2
def am
raise "AM, number must be 0-12" if self < 0 || self > 12
Time.parse("#{self}:00:00")
end
|
#Fixnum ⇒ Object
1
2
3
4
5
6
7
8
9
10
11
|
# File 'lib/duration/fixnum.rb', line 1
def Fixnum
def am
raise "AM, number must be 0-12" if self < 0 || self > 12
Time.parse("#{self}:00:00")
end
def pm
raise "PM, number must be 0-12" if self < 0 || self > 12
Time.parse("#{self+12}:00:00")
end
end
|
#pm ⇒ Object
7
8
9
10
|
# File 'lib/duration/fixnum.rb', line 7
def pm
raise "PM, number must be 0-12" if self < 0 || self > 12
Time.parse("#{self+12}:00:00")
end
|