class Object
Public Instance Methods
friday?()
click to toggle source
# File lib/week_of_month.rb, line 52 def friday? wday == 5 end
monday?()
click to toggle source
# File lib/week_of_month.rb, line 36 def monday? wday == 1 end
require_file(file_name)
click to toggle source
Supports both version of ruby 1.8 and 1.9 for loading a file.
# File lib/week_of_month.rb, line 5 def require_file(file_name) RUBY_VERSION < '1.9' ? require(file_name) : require_relative(file_name) end
saturday?()
click to toggle source
# File lib/week_of_month.rb, line 56 def saturday? wday == 6 end
sunday?()
click to toggle source
# File lib/week_of_month.rb, line 32 def sunday? wday == 0 end
thursday?()
click to toggle source
# File lib/week_of_month.rb, line 48 def thursday? wday == 4 end
to_date()
click to toggle source
# File lib/week_of_month.rb, line 25 def to_date ::Date.new(year, month, day) end
tuesday?()
click to toggle source
# File lib/week_of_month.rb, line 40 def tuesday? wday == 2 end
wednesday?()
click to toggle source
# File lib/week_of_month.rb, line 44 def wednesday? wday == 3 end