Class: Strict::MethodCallError

Inherits:
Error
  • Object
show all
Defined in:
lib/strict/method_call_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(verifiable_method:, remaining_args:, remaining_kwargs:, invalid_parameters:, missing_parameters:) ⇒ MethodCallError

rubocop:disable Metrics/MethodLength



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/strict/method_call_error.rb', line 7

def initialize(verifiable_method:, remaining_args:, remaining_kwargs:, invalid_parameters:, missing_parameters:) # rubocop:disable Metrics/MethodLength
  super(
    message_from(
      verifiable_method: verifiable_method,
      remaining_args: remaining_args,
      remaining_kwargs: remaining_kwargs,
      invalid_parameters: invalid_parameters,
      missing_parameters: missing_parameters
    )
  )

  @verifiable_method = verifiable_method
  @remaining_args = remaining_args
  @remaining_kwargs = remaining_kwargs
  @invalid_parameters = invalid_parameters
  @missing_parameters = missing_parameters
end

Instance Attribute Details

#invalid_parametersObject (readonly)

Returns the value of attribute invalid_parameters.



5
6
7
# File 'lib/strict/method_call_error.rb', line 5

def invalid_parameters
  @invalid_parameters
end

#missing_parametersObject (readonly)

Returns the value of attribute missing_parameters.



5
6
7
# File 'lib/strict/method_call_error.rb', line 5

def missing_parameters
  @missing_parameters
end

#remaining_argsObject (readonly)

Returns the value of attribute remaining_args.



5
6
7
# File 'lib/strict/method_call_error.rb', line 5

def remaining_args
  @remaining_args
end

#remaining_kwargsObject (readonly)

Returns the value of attribute remaining_kwargs.



5
6
7
# File 'lib/strict/method_call_error.rb', line 5

def remaining_kwargs
  @remaining_kwargs
end

#verifiable_methodObject (readonly)

Returns the value of attribute verifiable_method.



5
6
7
# File 'lib/strict/method_call_error.rb', line 5

def verifiable_method
  @verifiable_method
end