Module: ObjectInspector::Conversions

Defined in:
lib/object_inspector/conversions.rb

Overview

ObjectInspector::Conversions defines conversion functions used by ObjectInspector.

Class Method Summary collapse

Class Method Details

.Scope(value) ⇒ ObjectInspector::Scope

Convert the passed in value to an Scope object. Just returns the passed in value if it already is an Scope object.

:reek:UncommunicativeMethodName



15
16
17
18
19
20
21
22
# File 'lib/object_inspector/conversions.rb', line 15

def Scope(value) # rubocop:disable Naming/MethodName
  case value
  when ObjectInspector::Scope
    value
  else
    ObjectInspector::Scope.new(value)
  end
end