class RussianWorkdays::Month
Attributes
Public Class Methods
Source
# File lib/russian_workdays/month.rb, line 10 def initialize(year = Date.today.year, month = 1) raise MissingYearError, year unless DATES.key?(year) raise ArgumentError, 'Must be a number between 1 and 12' unless (1..12).include?(month) @year = year @month = month end
Private Instance Methods
Source
# File lib/russian_workdays/month.rb, line 20 def range Date.new(year, month, 1)..Date.new(year, month, -1) end