Class: Object

Inherits:
BasicObject
Defined in:
lib/error_handling_protocol/core_ext/object.rb

Instance Method Summary collapse

Instance Method Details

#calling_method_nameObject



7
8
9
10
11
12
13
# File 'lib/error_handling_protocol/core_ext/object.rb', line 7

def calling_method_name
  collaboration_location_in_defining_method = caller[1]

  method_name = collaboration_location_in_defining_method[/.+in `(.+)'/, 1]

  method_name.to_sym
end

#subclass_responsibilityObject



3
4
5
# File 'lib/error_handling_protocol/core_ext/object.rb', line 3

def subclass_responsibility
  raise ErrorHandlingProtocol::SubclassResponsibilityError.to_implement_instance_method_on calling_method_name, self
end