Class: Dsu::Views::EntryGroup::Show

Inherits:
Object
  • Object
show all
Includes:
Support::ColorThemable, Support::TimeFormatable
Defined in:
lib/dsu/views/entry_group/show.rb

Instance Method Summary collapse

Methods included from Support::TimeFormatable

dd_mm_yyyy, formatted_time, mm_dd, mm_dd_yyyy, timezone_for, yyyy_mm_dd, yyyy_mm_dd_or_through_for

Methods included from Support::ColorThemable

apply_theme, #prompt_with_options

Constructor Details

#initialize(entry_group:, options: {}) ⇒ Show

Returns a new instance of Show.

Raises:

  • (ArgumentError)


16
17
18
19
20
21
22
23
24
# File 'lib/dsu/views/entry_group/show.rb', line 16

def initialize(entry_group:, options: {})
  raise ArgumentError, 'entry_group is nil' if entry_group.nil?
  raise ArgumentError, 'entry_group is the wrong object type' unless entry_group.is_a?(Models::EntryGroup)
  raise ArgumentError, 'options is nil' if options.nil?
  raise ArgumentError, 'options is the wrong object type' unless options.is_a?(Hash)

  @entry_group = entry_group
  @options = options || {}
end

Instance Method Details

#callObject Also known as: render



26
27
28
# File 'lib/dsu/views/entry_group/show.rb', line 26

def call
  render!
end