Class: Upcoming::LastDayOfMonthGenerator

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

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)


3
4
5
# File 'lib/upcoming/generators/last_day_of_month_generator.rb', line 3

def valid?(date)
  (date + 1).month != date.month
end