Module: Inch::Language::Ruby::Provider::YARD::Object

Defined in:
lib/inch/language/ruby/provider/yard/object.rb,
lib/inch/language/ruby/provider/yard/object/base.rb,
lib/inch/language/ruby/provider/yard/object/root_object.rb,
lib/inch/language/ruby/provider/yard/object/class_object.rb,
lib/inch/language/ruby/provider/yard/object/module_object.rb,
lib/inch/language/ruby/provider/yard/object/method_object.rb,
lib/inch/language/ruby/provider/yard/object/constant_object.rb,
lib/inch/language/ruby/provider/yard/object/namespace_object.rb,
lib/inch/language/ruby/provider/yard/object/method_signature.rb,
lib/inch/language/ruby/provider/yard/object/class_variable_object.rb,
lib/inch/language/ruby/provider/yard/object/method_parameter_object.rb

Overview

CodeObject::Provider::YARD::Object object represent code objects.

Defined Under Namespace

Classes: Base, ClassObject, ClassVariableObject, ConstantObject, MethodObject, MethodParameterObject, MethodSignature, ModuleObject, NamespaceObject, RootObject

Class Method Summary collapse

Class Method Details

.clear_cacheObject



10
11
12
# File 'lib/inch/language/ruby/provider/yard/object.rb', line 10

def clear_cache
  @cache = {}
end

.for(yard_object) ⇒ Provider::YARD::Object

Returns a Proxy object for the given yard_object

Parameters:

  • yard_object (YARD::CodeObject)

Returns:



18
19
20
21
22
23
24
25
26
# File 'lib/inch/language/ruby/provider/yard/object.rb', line 18

def for(yard_object)
  @cache ||= {}
  if (proxy_object = @cache[cache_key(yard_object)])
    proxy_object
  else
    @cache[cache_key(yard_object)] =
      class_for(yard_object).new(yard_object)
  end
end