module ObjectInspector::Conversions

ObjectInspector::Conversions defines conversion functions used by ObjectInspector.

Public Instance Methods

Scope(value) click to toggle source

Convert the passed in value to an {ObjectInspector::Scope} object. Just returns the pass in value if it already is an {ObjectInspector::Scope} object.

@return [ObjectInspector::Scope]

# 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