Class: ApplicationService

Inherits:
Object
  • Object
show all
Defined in:
app/services/application_service.rb

Class Method Summary collapse

Class Method Details

.callObject



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