Class: Respawn::Setup

Inherits:
Data
  • Object
show all
Defined in:
lib/respawn/setup.rb

Instance Method Summary collapse

Constructor Details

#initialize(**options) ⇒ Setup

Returns a new instance of Setup.



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/respawn/setup.rb', line 24

def initialize(**options)
  with_defaults =
    OPTIONS.map.to_h do |key, value|
      [
        key,
        options.fetch(key) do
          if value.respond_to?(:call)
            value.call
          else
            value
          end
        end
      ]
    end

  super(with_defaults)
end