class DateInterval::Date
Attributes
date[R]
Public Class Methods
new(date)
click to toggle source
# File lib/date_interval/date.rb, line 8 def initialize(date) @date = date @add = true end
Public Instance Methods
add!()
click to toggle source
# File lib/date_interval/date.rb, line 17 def add! @add = true end
add?()
click to toggle source
# File lib/date_interval/date.rb, line 13 def add? @add end
remove!()
click to toggle source
# File lib/date_interval/date.rb, line 21 def remove! @add = false end
to_date()
click to toggle source
# File lib/date_interval/date.rb, line 33 def to_date date end
weekday?()
click to toggle source
# File lib/date_interval/date.rb, line 29 def weekday? !weekend? end
weekend?()
click to toggle source
# File lib/date_interval/date.rb, line 25 def weekend? [0, 6].include?(date.wday) end