Sha256: a247f3526c8c13a072d934d40449f3bc5a1ab57e46c2fb5df17cd374e41845ae

Contents?: true

Size: 257 Bytes

Versions: 4

Compression:

Stored size: 257 Bytes

Contents

module Repeatable
  module Expression
    class Weekday < Date
      def initialize(weekday:)
        @weekday = weekday
      end

      def include?(date)
        date.wday == weekday
      end

      private

      attr_reader :weekday
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
repeatable-1.0.0 lib/repeatable/expression/weekday.rb
repeatable-0.6.0 lib/repeatable/expression/weekday.rb
repeatable-0.5.0 lib/repeatable/expression/weekday.rb
repeatable-0.4.0 lib/repeatable/expression/weekday.rb