Class: Upcoming::WorkingDayGenerator

Inherits:
Generator
  • Object
show all
Defined in:
lib/upcoming/generators/working_day_generator.rb

Constant Summary collapse

WEEKDAYS =
(1..5)

Instance Attribute Summary

Attributes inherited from Generator

#choose

Instance Method Summary collapse

Methods inherited from Generator

#initialize, #step

Constructor Details

This class inherits a constructor from Upcoming::Generator

Instance Method Details

#valid?(date) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/upcoming/generators/working_day_generator.rb', line 5

def valid?(date)
  WEEKDAYS.include? date.wday
end