Class: Dsu::Views::EntryGroup::Show
- Inherits:
-
Object
- Object
- Dsu::Views::EntryGroup::Show
- Includes:
- Support::ColorThemable, Support::TimeFormatable
- Defined in:
- lib/dsu/views/entry_group/show.rb
Instance Method Summary collapse
- #call ⇒ Object (also: #render)
-
#initialize(entry_group:, options: {}) ⇒ Show
constructor
A new instance of Show.
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.
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 .nil? raise ArgumentError, 'options is the wrong object type' unless .is_a?(Hash) @entry_group = entry_group @options = || {} end |
Instance Method Details
#call ⇒ Object Also known as: render
26 27 28 |
# File 'lib/dsu/views/entry_group/show.rb', line 26 def call render! end |