Module: ToProcInterface::CallingService

Includes:
Mixin
Defined in:
lib/to_proc_interface.rb

Overview

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

Examples:

Usage

extend ToProcInterface::CallingService

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) ⇒ Object

See Also:



131
132
133
134
# File 'lib/to_proc_interface.rb', line 131

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