Parent

Included Modules

Runt::WIMonth

TExpr that matches the week in a month. For example:

   WIMonth.new(1)

See also: Date
FIXME .dates mixin seems functionally broken

Constants

VALID_RANGE

Public Class Methods

new(ordinal) click to toggle source
# File lib/runt/temporalexpression.rb, line 630
def initialize(ordinal)
  unless VALID_RANGE.include?(ordinal)
    raise ArgumentError, 'invalid ordinal week of month'
  end
  @ordinal = ordinal
end

Public Instance Methods

include?(date) click to toggle source
# File lib/runt/temporalexpression.rb, line 637
def include?(date)
  week_matches?(@ordinal,date)
end
to_s() click to toggle source
# File lib/runt/temporalexpression.rb, line 641
def to_s
  "#{Runt.ordinalize(@ordinal)} week of any month"
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.