Class: Gitlab::Utils::DelegatorOverride::Error

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/utils/delegator_override/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method_name, target_class, target_location, delegator_class, delegator_location) ⇒ Error

Returns a new instance of Error.


9
10
11
12
13
14
15
# File 'lib/gitlab/utils/delegator_override/error.rb', line 9

def initialize(method_name, target_class, target_location, delegator_class, delegator_location)
  @method_name = method_name
  @target_class = target_class
  @target_location = target_location
  @delegator_class = delegator_class
  @delegator_location = delegator_location
end

Instance Attribute Details

#delegator_classObject

Returns the value of attribute delegator_class.


7
8
9
# File 'lib/gitlab/utils/delegator_override/error.rb', line 7

def delegator_class
  @delegator_class
end

#delegator_locationObject

Returns the value of attribute delegator_location.


7
8
9
# File 'lib/gitlab/utils/delegator_override/error.rb', line 7

def delegator_location
  @delegator_location
end

#method_nameObject

Returns the value of attribute method_name.


7
8
9
# File 'lib/gitlab/utils/delegator_override/error.rb', line 7

def method_name
  @method_name
end

#target_classObject

Returns the value of attribute target_class.


7
8
9
# File 'lib/gitlab/utils/delegator_override/error.rb', line 7

def target_class
  @target_class
end

#target_locationObject

Returns the value of attribute target_location.


7
8
9
# File 'lib/gitlab/utils/delegator_override/error.rb', line 7

def target_location
  @target_location
end

Instance Method Details

#to_sObject


17
18
19
# File 'lib/gitlab/utils/delegator_override/error.rb', line 17

def to_s
  "#{delegator_class}##{method_name} is overriding #{target_class}##{method_name}. delegator_location: #{delegator_location} target_location: #{target_location}"
end