Sha256: 3804e2f28182ecba5ea137f482bff7d5db01b9c8f329649ceb00c235a88207cc

Contents?: true

Size: 428 Bytes

Versions: 16

Compression:

Stored size: 428 Bytes

Contents

# frozen_string_literal: true

module Montrose
  module Rule
    class MonthOfYear
      include Montrose::Rule

      def self.apply_options(opts)
        opts[:month]
      end

      # Initializes rule
      #
      # @param [Array] months - valid month numbers
      #
      def initialize(months)
        @months = months
      end

      def include?(time)
        @months.include?(time.month)
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
montrose-0.18.0 lib/montrose/rule/month_of_year.rb
montrose-0.17.0 lib/montrose/rule/month_of_year.rb
montrose-0.16.0 lib/montrose/rule/month_of_year.rb
montrose-0.15.0 lib/montrose/rule/month_of_year.rb
montrose-0.14.0 lib/montrose/rule/month_of_year.rb
montrose-0.13.0 lib/montrose/rule/month_of_year.rb
montrose-0.12.0 lib/montrose/rule/month_of_year.rb
montrose-0.11.2 lib/montrose/rule/month_of_year.rb
montrose-0.11.1 lib/montrose/rule/month_of_year.rb
montrose-0.11.0 lib/montrose/rule/month_of_year.rb
montrose-0.10.1 lib/montrose/rule/month_of_year.rb
montrose-0.10.0 lib/montrose/rule/month_of_year.rb
montrose-0.9.0 lib/montrose/rule/month_of_year.rb
montrose-0.8.2 lib/montrose/rule/month_of_year.rb
montrose-0.8.1 lib/montrose/rule/month_of_year.rb
montrose-0.8.0 lib/montrose/rule/month_of_year.rb