Module: Inch::CodeObject::Provider::YARD::Object
- Defined in:
- lib/inch/code_object/provider/yard/object.rb,
lib/inch/code_object/provider/yard/object/base.rb,
lib/inch/code_object/provider/yard/object/root_object.rb,
lib/inch/code_object/provider/yard/object/class_object.rb,
lib/inch/code_object/provider/yard/object/method_object.rb,
lib/inch/code_object/provider/yard/object/module_object.rb,
lib/inch/code_object/provider/yard/object/constant_object.rb,
lib/inch/code_object/provider/yard/object/method_signature.rb,
lib/inch/code_object/provider/yard/object/namespace_object.rb,
lib/inch/code_object/provider/yard/object/method_parameter_object.rb
Overview
CodeObject::Provider::YARD::Object object represent code objects.
Defined Under Namespace
Classes: Base, ClassObject, ConstantObject, MethodObject, MethodParameterObject, MethodSignature, ModuleObject, NamespaceObject, RootObject
Class Method Summary collapse
- .clear_cache ⇒ Object
-
.for(yard_object) ⇒ Provider::YARD::Object
Returns a Proxy object for the given
yard_object
.
Class Method Details
.clear_cache ⇒ Object
9 10 11 |
# File 'lib/inch/code_object/provider/yard/object.rb', line 9 def clear_cache @cache = {} end |
.for(yard_object) ⇒ Provider::YARD::Object
Returns a Proxy object for the given yard_object
17 18 19 20 21 22 23 24 |
# File 'lib/inch/code_object/provider/yard/object.rb', line 17 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 |