Sha256: 2269d29411f0246c2ef0f048f7d3df921e608e624d0a2f06ba6a7cf25b448354
Contents?: true
Size: 838 Bytes
Versions: 9
Compression:
Stored size: 838 Bytes
Contents
# frozen_string_literal: true require_relative '../support/time_formatable' require_relative 'base_presenter' module Dsu module Presenters class EntryGroupPresenter < BasePresenter attr_reader :entry_group def initialize(entry_group, options: {}) super @entry_group = entry_group end def formatted_time colors = color_theme.date apply_theme(Support::TimeFormatable.formatted_time(time: time), theme_color: colors) end def formatted_errors return if valid? colors = color_theme.error apply_theme(errors.full_messages.join(', '), theme_color: colors) end def no_entries_available colors = color_theme.info apply_theme('(no entries available for this day)', theme_color: colors) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems