Class: SemesterPeriodDatesQuery

Inherits:
Object
  • Object
show all
Defined in:
lib/sirius/semester_period_dates_query.rb

Instance Method Summary collapse

Instance Method Details

#apply(resource, faculty_semester:, **rest) ⇒ Object


3
4
5
6
# File 'lib/sirius/semester_period_dates_query.rb', line 3

def apply(resource, faculty_semester:, **rest)
  query = "startDate>=#{faculty_semester.starts_at};endDate<=#{faculty_semester.ends_at}"
  resource.where(query)
end