Module: SuperDiff::ObjectInspection::InspectionTreeBuilders

Defined in:
lib/super_diff/object_inspection.rb

Class Method Summary collapse

Class Method Details

.const_missing(missing_const_name) ⇒ Object



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

def self.const_missing(missing_const_name)
  if missing_const_name == :Base
    warn "      WARNING: SuperDiff::ObjectInspection::InspectionTreeBuilders::\#{missing_const_name} is deprecated and will be removed in the next major release.\n      Please use SuperDiff::Core::AbstractInspectionTreeBuilder instead.\n      \#{caller_locations.join(\"\\n\")}\n    WARNING\n    Core::AbstractInspectionTreeBuilder\n  elsif Basic::InspectionTreeBuilders.const_defined?(missing_const_name)\n    warn <<~WARNING\n      WARNING: SuperDiff::ObjectInspection::InspectionTreeBuilders::\#{missing_const_name} is deprecated and will be removed in the next major release.\n      Please use SuperDiff::Basic::InspectionTreeBuilders::\#{missing_const_name} instead.\n      \#{caller_locations.join(\"\\n\")}\n    WARNING\n    Basic::InspectionTreeBuilders.const_get(missing_const_name)\n  else\n    super\n  end\nend\n"