Module: Plumbum::Parameters

Defined in:
lib/plumbum/parameters.rb

Overview

Utility module that converts constructor parameters to a Provider.

Instance Method Summary collapse

Instance Method Details

#initialize(*arguments, **keywords, &block) ⇒ Object

Parameters:

  • arguments (Array)

    the arguments passed to the constructor.

  • keywords (Hash)

    the keywords passed to the constructor, including any injected dependencies.

  • block (Proc)

    the block passed to the constructor.



14
15
16
17
18
19
20
# File 'lib/plumbum/parameters.rb', line 14

def initialize(*, **keywords, &)
  values, keywords = extract_plumbum_dependencies(keywords)

  @plumbum_parameters_provider = Plumbum::ManyProvider.new(values:)

  super
end