Class: PuppetX::PuppetLabs::Strings::YARD::CodeObjects::ProviderObject

Inherits:
PuppetNamespaceObject
  • Object
show all
Defined in:
lib/puppet_x/puppetlabs/strings/yard/code_objects/provider_object.rb

Instance Attribute Summary collapse

Attributes inherited from PuppetNamespaceObject

#type_info

Instance Method Summary collapse

Methods inherited from PuppetNamespaceObject

#inheritance_tree, #to_s

Instance Attribute Details

#parametersArray<Array(String, String)>

A list of parameters attached to this class.

Returns:

  • (Array<Array(String, String)>)


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

def parameters
  @parameters
end

Instance Method Details

#to_json(*a) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/puppet_x/puppetlabs/strings/yard/code_objects/provider_object.rb', line 6

def to_json(*a)
  {
    "name"             => @name,
    "type_name"        => @type_name,
    "file"             => file,
    "line"             => line,
    "docstring"        => Puppet::Util::Docs.scrub(@docstring),
    "commands"         => @commands,
    "confines"         => @confines,
    "defaults"         => @defaults,
    "features"         => @features,
    "examples"              => self.tags.map do |tag|
        tag.text if tag.tag_name == 'example'
    end.compact,
  }.to_json(*a)
end