Sha256: 7f45852aee886ab1c0201d67f2c9e8d0fcef3fd835bab1980fdb26a0c0be665c

Contents?: true

Size: 374 Bytes

Versions: 6

Compression:

Stored size: 374 Bytes

Contents

# frozen_string_literal: true

require_relative "collection_preset"

module RussianWorkdays
  class Month < CollectionPreset
    def initialize(year = Date.today.year, month = 1)
      raise ArgumentError, "Must be a number between 1 and 12" unless (1..12).include?(month)
      @dates = Collection.new(Date.new(year, month, 1)..Date.new(year, month, -1))
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
russian_workdays-2.6.0 lib/russian_workdays/month.rb
russian_workdays-2.5.0 lib/russian_workdays/month.rb
russian_workdays-2.4.0 lib/russian_workdays/month.rb
russian_workdays-2.3.0 lib/russian_workdays/month.rb
russian_workdays-2.1.0 lib/russian_workdays/month.rb
russian_workdays-2.0.0 lib/russian_workdays/month.rb