Module: Inch::CodeObject::Provider
- Defined in:
- lib/inch/code_object/provider.rb,
lib/inch/code_object/provider/yard.rb,
lib/inch/code_object/provider/yard/object.rb,
lib/inch/code_object/provider/yard/parser.rb,
lib/inch/code_object/provider/yard/docstring.rb,
lib/inch/code_object/provider/yard/object/base.rb,
lib/inch/code_object/provider/yard/nodoc_helper.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
Provider modules “provide” a Codebase object with code objects. They are the intermediary between the raw representation that tools like YARD deliver and the “interface” that Inch expects.
YARD Example:
YARD’s SourceParser returns ::YARD::CodeObject objects, which are cast to Provider::YARD::Object::Base objects that can ensure naming conventions et al. follow certain rules. These objects are then again converted into CodeObject::Proxy::Base objects that form the codebase:
::YARD::CodeObject
↓
::Inch::CodeObject::Provider::YARD::Object::Base
↓
(Hash)
↓
::Inch::CodeObject::Proxy::Base
Defined Under Namespace
Modules: YARD
Class Method Summary collapse
Class Method Details
.parse(dir, config = Inch::Config.codebase, type = :YARD) ⇒ Object
24 25 26 |
# File 'lib/inch/code_object/provider.rb', line 24 def self.parse(dir, config = Inch::Config.codebase, type = :YARD) provider_for(type).parse(dir, config) end |
.provider_for(type) ⇒ Module
29 30 31 |
# File 'lib/inch/code_object/provider.rb', line 29 def self.provider_for(type) const_get(type) end |