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 pass in value if it already is an Scope object.



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

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