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