Sha256: a2b3b1b9f25cda63f6367c6938dab3a91ccde73640eef840e05db9d28b908db8

Contents?: true

Size: 304 Bytes

Versions: 3

Compression:

Stored size: 304 Bytes

Contents

module Repeatable
  module Expression
    class DayInMonth < Base
      def initialize(day:)
        @day = day
      end

      def include?(date)
        date.day == day
      end

      def to_h
        { day_in_month: { day: day } }
      end

      private

      attr_reader :day
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
repeatable-0.3.0 lib/repeatable/expression/day_in_month.rb
repeatable-0.2.1 lib/repeatable/expression/day_in_month.rb
repeatable-0.2.0 lib/repeatable/expression/day_in_month.rb