Class: PuppetX::PuppetLabs::Strings::YARD::CodeObjects::PuppetNamespaceObject

Inherits:
YARD::CodeObjects::NamespaceObject
  • Object
show all
Defined in:
lib/puppet_x/puppetlabs/strings/yard/code_objects/puppet_namespace_object.rb

Direct Known Subclasses

DefinedTypeObject, ProviderObject, TypeObject

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#type_infoObject

Returns the value of attribute type_info.



3
4
5
# File 'lib/puppet_x/puppetlabs/strings/yard/code_objects/puppet_namespace_object.rb', line 3

def type_info
  @type_info
end

Instance Method Details

#inheritance_tree(include_mods = false) ⇒ Object

NOTE: ‘YARD::Registry#resolve` requires a method with this signature to be present on all subclasses of `NamespaceObject`.



6
7
8
# File 'lib/puppet_x/puppetlabs/strings/yard/code_objects/puppet_namespace_object.rb', line 6

def inheritance_tree(include_mods = false)
  [self]
end

#to_json(*a) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
# File 'lib/puppet_x/puppetlabs/strings/yard/code_objects/puppet_namespace_object.rb', line 14

def to_json(*a)
  {
    "name"             => @name,
    "file"             => file,
    "line"             => line,
    "docstring"        => @docstring,
    "examples"              => self.tags.map do |tag|
        tag.text if tag.tag_name == 'example'
    end.compact,
  }.to_json(*a)
end

#to_sObject



10
11
12
# File 'lib/puppet_x/puppetlabs/strings/yard/code_objects/puppet_namespace_object.rb', line 10

def to_s
  name.to_s
end