Sha256: 9d7d0236094f7e40f23c3bd5a8fc53e5278b9dab5d97839df8f5fe9212bdd1c5

Contents?: true

Size: 397 Bytes

Versions: 12

Compression:

Stored size: 397 Bytes

Contents

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

12 entries across 12 versions & 1 rubygems

Version Path
montrose-0.6.0 lib/montrose/rule/month_of_year.rb
montrose-0.5.0 lib/montrose/rule/month_of_year.rb
montrose-0.4.3 lib/montrose/rule/month_of_year.rb
montrose-0.4.2 lib/montrose/rule/month_of_year.rb
montrose-0.4.1 lib/montrose/rule/month_of_year.rb
montrose-0.4.0 lib/montrose/rule/month_of_year.rb
montrose-0.3.0 lib/montrose/rule/month_of_year.rb
montrose-0.2.2 lib/montrose/rule/month_of_year.rb
montrose-0.2.1 lib/montrose/rule/month_of_year.rb
montrose-0.2.0 lib/montrose/rule/month_of_year.rb
montrose-0.1.1 lib/montrose/rule/month_of_year.rb
montrose-0.1.0 lib/montrose/rule/month_of_year.rb