Sha256: cf1c22df9419ed79a42f7362c75418c7fa5bf74680edf20304e7f43d7eb45002

Contents?: true

Size: 911 Bytes

Versions: 13

Compression:

Stored size: 911 Bytes

Contents

require 'puppet-strings/yard/code_objects/base'

# Implements the base class for "groups".
#
# A group behaves like a YARD namespace object, but displays differently in the HTML output.
class PuppetStrings::Yard::CodeObjects::Group < PuppetStrings::Yard::CodeObjects::Base
  # Gets the singleton instance of the group.
  # @param [Symbol] key The key to lookup the group for.
  # @return Returns the singleton instance of the group.
  def self.instance(key)
    instance = P(:root, key)
    return instance unless instance.is_a?(YARD::CodeObjects::Proxy)
    instance = self.new(:root, key)
    instance.visibility = :hidden
    P(:root).children << instance
    instance
  end

  # Gets the path to the group.
  # @return [String] Returns the path to the group.
  def path
    @name.to_s
  end

  # Gets the type of the group.
  # @return [Symbol] Returns the type of the group.
  def type
    @name
  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/group.rb
puppet-strings-2.4.0 lib/puppet-strings/yard/code_objects/group.rb
puppet-strings-2.3.1 lib/puppet-strings/yard/code_objects/group.rb
puppet-strings-2.3.0 lib/puppet-strings/yard/code_objects/group.rb
puppet-strings-2.2.0 lib/puppet-strings/yard/code_objects/group.rb
puppet-strings-2.1.0 lib/puppet-strings/yard/code_objects/group.rb
puppet-strings-2.0.0 lib/puppet-strings/yard/code_objects/group.rb
puppet-strings-1.2.1 lib/puppet-strings/yard/code_objects/group.rb
puppet-strings-1.2.0 lib/puppet-strings/yard/code_objects/group.rb
puppet-strings-1.1.1 lib/puppet-strings/yard/code_objects/group.rb
puppet-strings-1.1.0 lib/puppet-strings/yard/code_objects/group.rb
puppet-strings-1.0.0 lib/puppet-strings/yard/code_objects/group.rb
puppet-strings-0.99.0 lib/puppet-strings/yard/code_objects/group.rb