Sha256: cffe3dde8d32ce5493e222bc96428040f95063049983e4469496f88a7b0ad69c

Contents?: true

Size: 698 Bytes

Versions: 35

Compression:

Stored size: 698 Bytes

Contents

# frozen_string_literal: true

require_relative 'no_entries_to_display'

module Dsu
  module Views
    module EntryGroup
      module Shared
        class NoEntriesToDisplayForWeekOf < NoEntriesToDisplay
          def initialize(time:, options: {})
            super(times: [time.beginning_of_week, time.end_of_week], options: options)

            @time = time
          end

          private

          attr_reader :time

          # TODO: I18n.
          def message
            "(nothing to display for week of #{week_of_string}, #{time_range})"
          end

          # TODO: I18n.
          def week_of_string
            time.to_date
          end
        end
      end
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
dsu-3.0.0.alpha.1 lib/dsu/views/entry_group/shared/no_entries_to_display_for_week_of.rb
dsu-3.0.0.alpha.0 lib/dsu/views/entry_group/shared/no_entries_to_display_for_week_of.rb
dsu-2.4.4 lib/dsu/views/entry_group/shared/no_entries_to_display_for_week_of.rb
dsu-2.4.3 lib/dsu/views/entry_group/shared/no_entries_to_display_for_week_of.rb
dsu-2.4.2 lib/dsu/views/entry_group/shared/no_entries_to_display_for_week_of.rb
dsu-2.4.1 lib/dsu/views/entry_group/shared/no_entries_to_display_for_week_of.rb
dsu-2.4.0 lib/dsu/views/entry_group/shared/no_entries_to_display_for_week_of.rb
dsu-2.3.2 lib/dsu/views/entry_group/shared/no_entries_to_display_for_week_of.rb
dsu-2.3.1 lib/dsu/views/entry_group/shared/no_entries_to_display_for_week_of.rb
dsu-2.3.0 lib/dsu/views/entry_group/shared/no_entries_to_display_for_week_of.rb
dsu-2.2.2 lib/dsu/views/entry_group/shared/no_entries_to_display_for_week_of.rb
dsu-2.2.1 lib/dsu/views/entry_group/shared/no_entries_to_display_for_week_of.rb
dsu-2.2.0 lib/dsu/views/entry_group/shared/no_entries_to_display_for_week_of.rb
dsu-2.2.0.rc.2 lib/dsu/views/entry_group/shared/no_entries_to_display_for_week_of.rb
dsu-2.2.0.rc.1 lib/dsu/views/entry_group/shared/no_entries_to_display_for_week_of.rb