Module: ToProcInterface::Initializer

Includes:
Mixin
Defined in:
lib/to_proc_interface.rb

Overview

Interface with predefined #call method which delegates all the given params into class’ constructor.

Examples:

Usage

extend ToProcInterface::Initializer

Instance Method Summary collapse

Methods included from Mixin

#to_proc

Methods included from Delegations

#:<<, #:>>, #:[], #arity, #binding, #curry, delegate_to_proc, #lambda?, #parameters, proc_methods, #ruby2_keywords, #source_location, #yield

Instance Method Details

#call(*args, **opts, &block) ⇒ self

Returns:

  • (self)

See Also:

  • #initialize


167
168
169
# File 'lib/to_proc_interface.rb', line 167

def call(*args, **opts, &block)
  new(*args, **opts, &block)
end