Module: Renalware::HD::Scheduling

Defined in:
app/models/renalware/hd/scheduling/diary.rb,
app/models/renalware/hd/scheduling/diary_slot.rb,
app/models/renalware/hd/scheduling/diary_range.rb,
app/models/renalware/hd/scheduling/master_diary.rb,
app/models/renalware/hd/scheduling/weekly_diary.rb,
app/presenters/renalware/hd/scheduling/null_slot.rb,
app/policies/renalware/hd/scheduling/diary_policy.rb,
app/models/renalware/hd/scheduling/archive_arguments.rb,
app/presenters/renalware/hd/scheduling/diary_presenter.rb,
app/models/renalware/hd/scheduling/diary_housekeeping_job.rb,
app/controllers/renalware/hd/scheduling/diaries_controller.rb,
app/presenters/renalware/hd/scheduling/diary_slot_presenter.rb,
app/controllers/renalware/hd/scheduling/diary_slots_controller.rb,
app/models/renalware/hd/scheduling/find_or_create_master_diary.rb,
app/models/renalware/hd/scheduling/find_or_create_diary_by_week_query.rb

Defined Under Namespace

Classes: ArchiveArguments, DiariesController, Diary, DiaryHousekeepingJob, DiaryPolicy, DiaryPresenter, DiaryRange, DiarySlot, DiarySlotPresenter, DiarySlotsController, FindOrCreateDiaryByWeekQuery, FindOrCreateMasterDiary, MasterDiary, WeeklyDiary

Constant Summary collapse

NullSlot =
Naught.build do |config|
  config.black_hole
  config.define_explicit_conversions
  config.predicates_return false

  attr_reader :diary_id, :diurnal_period_code_id, :station_id, :day_of_week

  def initialize(diary_id, diurnal_period_code_id, station_id, day_of_week)
    @diary_id = diary_id
    @diurnal_period_code_id = diurnal_period_code_id
    @station_id = station_id
    @day_of_week = day_of_week
  end

  def master?
    false
  end

  def cell_id
    "#{diurnal_period_code_id}-#{station_id}-#{day_of_week}"
  end

  def cache_key
    [
      self.class.name,
      diary_id,
      diurnal_period_code_id,
      station_id,
      day_of_week
    ].join("-")
  end
end