Class: Dsu::Views::Configuration::Show

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

Instance Method Summary collapse

Methods included from Support::ColorThemable

apply_theme, #prompt_with_options

Constructor Details

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

Returns a new instance of Show.

Raises:

  • (ArgumentError)


14
15
16
17
18
19
20
21
22
# File 'lib/dsu/views/configuration/show.rb', line 14

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

  @config = config
  @options = options || {}
end

Instance Method Details

#callObject Also known as: render



24
25
26
# File 'lib/dsu/views/configuration/show.rb', line 24

def call
  render!
end