class Denso::Calendar::Date
Public Class Methods
new(*args)
click to toggle source
Calls superclass method
# File lib/denso/calendar/date.rb, line 8 def initialize(*args) options = args.last.is_a?(Hash) ? args.pop : { holiday: true } super(*args) @holiday = options[:holiday] end
Public Instance Methods
business_day?()
click to toggle source
Returns true if the day is business day, meaning not holiday
@return [Boolean] @see holiday?
# File lib/denso/calendar/date.rb, line 27 def business_day? !holiday? end
holiday?()
click to toggle source
Returns true if the day is holiday
@return [Boolean] @see business_day?
# File lib/denso/calendar/date.rb, line 19 def holiday? @holiday end