Class: ConvenientService::Support::Arguments::NullArguments Private

Inherits:
ConvenientService::Support::Arguments show all
Defined in:
lib/convenient_service/support/arguments/null_arguments.rb,
lib/convenient_service/support/arguments/null_arguments/exceptions.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

Modules: Exceptions

Instance Attribute Summary

Attributes inherited from ConvenientService::Support::Arguments

#args, #block, #kwargs

Instance Method Summary collapse

Methods inherited from ConvenientService::Support::Arguments

#==, #[], #any?, #deconstruct, #deconstruct_keys, #none?, null_arguments

Constructor Details

#initializevoid

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



20
21
22
23
24
# File 'lib/convenient_service/support/arguments/null_arguments.rb', line 20

def initialize
  @args = [].freeze
  @kwargs = {}.freeze
  @block = nil
end

Instance Method Details

#block=(other_block) ⇒ Object

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:

  • other_block (Proc, nil)

Since:

  • 1.0.0



29
30
31
# File 'lib/convenient_service/support/arguments/null_arguments.rb', line 29

def block=(other_block)
  ::ConvenientService.raise Exceptions::BlockSetIsNotAllowed.new
end

#null_arguments?Boolean Also known as: nil_arguments?

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:

  • (Boolean)

Since:

  • 1.0.0



36
37
38
# File 'lib/convenient_service/support/arguments/null_arguments.rb', line 36

def null_arguments?
  true
end

#to_argumentsConvenientService::Support::Arguments

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:

Since:

  • 1.0.0



48
49
50
# File 'lib/convenient_service/support/arguments/null_arguments.rb', line 48

def to_arguments
  ConvenientService::Support::Arguments.new
end