Sha256: 775dd45a156e2fb8616d97d013454137aa59e8623512d27a44f1f149af2f6b9e

Contents?: true

Size: 648 Bytes

Versions: 13

Compression:

Stored size: 648 Bytes

Contents

# Implements the base code object.
class PuppetStrings::Yard::CodeObjects::Base < YARD::CodeObjects::NamespaceObject
  # Allocates a new code object.
  # @param [Array] args The arguments to initialize the code object with.
  # @return Returns the code object.
  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(self).call(*args)
    existing = YARD::Registry.at(object.path)
    object = existing if existing && existing.class == self
    yield(object) if block_given?
    object
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
puppet-strings-2.5.0 lib/puppet-strings/yard/code_objects/base.rb
puppet-strings-2.4.0 lib/puppet-strings/yard/code_objects/base.rb
puppet-strings-2.3.1 lib/puppet-strings/yard/code_objects/base.rb
puppet-strings-2.3.0 lib/puppet-strings/yard/code_objects/base.rb
puppet-strings-2.2.0 lib/puppet-strings/yard/code_objects/base.rb
puppet-strings-2.1.0 lib/puppet-strings/yard/code_objects/base.rb
puppet-strings-2.0.0 lib/puppet-strings/yard/code_objects/base.rb
puppet-strings-1.2.1 lib/puppet-strings/yard/code_objects/base.rb
puppet-strings-1.2.0 lib/puppet-strings/yard/code_objects/base.rb
puppet-strings-1.1.1 lib/puppet-strings/yard/code_objects/base.rb
puppet-strings-1.1.0 lib/puppet-strings/yard/code_objects/base.rb
puppet-strings-1.0.0 lib/puppet-strings/yard/code_objects/base.rb
puppet-strings-0.99.0 lib/puppet-strings/yard/code_objects/base.rb