Sha256: 47a333f7749daf8ee90ff2648cfb151bcdb0e67af80a79454eb58783bb68ef9c

Contents?: true

Size: 977 Bytes

Versions: 52

Compression:

Stored size: 977 Bytes

Contents

# frozen_string_literal: true

require "renalware/hd"

module Renalware
  module HD
    module Scheduling
      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
    end
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
renalware-core-2.1.1 app/presenters/renalware/hd/scheduling/null_slot.rb
renalware-core-2.1.0 app/presenters/renalware/hd/scheduling/null_slot.rb
renalware-core-2.0.167 app/presenters/renalware/hd/scheduling/null_slot.rb
renalware-core-2.0.166 app/presenters/renalware/hd/scheduling/null_slot.rb
renalware-core-2.0.165 app/presenters/renalware/hd/scheduling/null_slot.rb
renalware-core-2.0.164 app/presenters/renalware/hd/scheduling/null_slot.rb
renalware-core-2.0.163 app/presenters/renalware/hd/scheduling/null_slot.rb
renalware-core-2.0.162 app/presenters/renalware/hd/scheduling/null_slot.rb
renalware-core-2.0.161 app/presenters/renalware/hd/scheduling/null_slot.rb
renalware-core-2.0.160 app/presenters/renalware/hd/scheduling/null_slot.rb
renalware-core-2.0.159 app/presenters/renalware/hd/scheduling/null_slot.rb
renalware-core-2.0.158 app/presenters/renalware/hd/scheduling/null_slot.rb
renalware-core-2.0.157 app/presenters/renalware/hd/scheduling/null_slot.rb
renalware-core-2.0.156 app/presenters/renalware/hd/scheduling/null_slot.rb
renalware-core-2.0.155 app/presenters/renalware/hd/scheduling/null_slot.rb
renalware-core-2.0.153 app/presenters/renalware/hd/scheduling/null_slot.rb
renalware-core-2.0.152 app/presenters/renalware/hd/scheduling/null_slot.rb
renalware-core-2.0.151 app/presenters/renalware/hd/scheduling/null_slot.rb
renalware-core-2.0.149 app/presenters/renalware/hd/scheduling/null_slot.rb
renalware-core-2.0.148 app/presenters/renalware/hd/scheduling/null_slot.rb