Class: ApplicationService
- Inherits:
-
Object
- Object
- ApplicationService
- Defined in:
- app/services/application_service.rb
Direct Known Subclasses
Class Method Summary collapse
- .call ⇒ Object
-
.generate_start_date_end_date(year, month) ⇒ Object
Set the start_date to the first day of the given month and year, and the end_date to the last day of the givenn month.
Class Method Details
.call ⇒ Object
4 5 6 |
# File 'app/services/application_service.rb', line 4 def self.call(*, &) new(*, &).call end |
.generate_start_date_end_date(year, month) ⇒ Object
Set the start_date to the first day of the given month and year, and the end_date to the last day of the givenn month.
10 11 12 13 14 15 |
# File 'app/services/application_service.rb', line 10 def self.generate_start_date_end_date(year, month) start_date = Date.new(year, month, 1) end_date = start_date.end_of_month [start_date, end_date] end |