Class: BothIsGood::Context::Error

Inherits:
Object
  • Object
show all
Includes:
Names, Memoization
Defined in:
lib/both_is_good/context/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Names

#class_to_tag, #method_to_tag, #underscore

Methods included from Memoization

included

Constructor Details

#initialize(target:, args:, error:, dispatched_name:) ⇒ Error

Returns a new instance of Error.



9
10
11
12
13
14
# File 'lib/both_is_good/context/error.rb', line 9

def initialize(target:, args:, error:, dispatched_name:)
  @target = target
  @args = args
  @error = error
  @dispatched_name = dispatched_name
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



7
8
9
# File 'lib/both_is_good/context/error.rb', line 7

def args
  @args
end

#dispatched_nameObject (readonly)

Returns the value of attribute dispatched_name.



7
8
9
# File 'lib/both_is_good/context/error.rb', line 7

def dispatched_name
  @dispatched_name
end

#errorObject (readonly)

Returns the value of attribute error.



7
8
9
# File 'lib/both_is_good/context/error.rb', line 7

def error
  @error
end

Instance Method Details

#method_nameObject



18
# File 'lib/both_is_good/context/error.rb', line 18

def method_name = @target.method_name

#target_classObject



16
# File 'lib/both_is_good/context/error.rb', line 16

def target_class = @target.target_class