Class: PuppetStrings::Yard::CodeObjects::Base
- Inherits:
-
YARD::CodeObjects::NamespaceObject
- Object
- YARD::CodeObjects::NamespaceObject
- PuppetStrings::Yard::CodeObjects::Base
- Defined in:
- lib/puppet-strings/yard/code_objects/base.rb
Overview
Implements the base code object.
Direct Known Subclasses
Class, DataType, DataTypeAlias, DefinedType, Function, Group, Plan, Provider, Task, Type
Class Method Summary collapse
-
.new(*args) {|object| ... } ⇒ Object
Allocates a new code object.
Class Method Details
.new(*args) {|object| ... } ⇒ Object
Allocates a new code object.
8 9 10 11 12 13 14 15 |
# File 'lib/puppet-strings/yard/code_objects/base.rb', line 8 def self.new(*args) # Skip the super class' implementation because it detects :: in names and this will cause namespaces in the output we don't want object = Object.class.instance_method(:new).bind_call(self, *args) existing = YARD::Registry.at(object.path) object = existing if existing.instance_of?(self) yield(object) if block_given? object end |