Class: ConvenientService::Utils::Method::LooseCall Private

Inherits:
Support::Command show all
Defined in:
lib/convenient_service/utils/method/loose_call.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0

Defined Under Namespace

Classes: Signature

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Support::Command

[], call

Constructor Details

#initialize(method, *args, **kwargs, &block) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

Since:

  • 1.0.0



301
302
303
304
305
306
# File 'lib/convenient_service/utils/method/loose_call.rb', line 301

def initialize(method, *args, **kwargs, &block)
  @method = method
  @args = args
  @kwargs = kwargs
  @block = block
end

Instance Attribute Details

#argsObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0



280
281
282
# File 'lib/convenient_service/utils/method/loose_call.rb', line 280

def args
  @args
end

#blockObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0



292
293
294
# File 'lib/convenient_service/utils/method/loose_call.rb', line 292

def block
  @block
end

#kwargsObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0



286
287
288
# File 'lib/convenient_service/utils/method/loose_call.rb', line 286

def kwargs
  @kwargs
end

#methodObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 1.0.0



274
275
276
# File 'lib/convenient_service/utils/method/loose_call.rb', line 274

def method
  @method
end

Instance Method Details

#callObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns Can be any type.

Returns:

  • (Object)

    Can be any type.

Since:

  • 1.0.0



314
315
316
317
318
319
320
# File 'lib/convenient_service/utils/method/loose_call.rb', line 314

def call
  method.call(
    *signature.loose_args_from(args),
    **signature.loose_kwargs_from(kwargs),
    &signature.loose_block_from(block)
  )
end