Class: PuppetStrings::Yard::Parsers::Puppet::ClassStatement

Inherits:
ParameterizedStatement show all
Defined in:
lib/puppet-strings/yard/parsers/puppet/statement.rb

Overview

Implements the Puppet class statement.

Constant Summary

Constants inherited from Statement

Statement::COMMENT_REGEX

Instance Attribute Summary collapse

Attributes inherited from ParameterizedStatement

#parameters

Attributes inherited from Statement

#comments_range, #docstring, #file, #line, #source

Instance Method Summary collapse

Methods inherited from Statement

#comments, #comments_hash_flag, #extract_docstring, #show

Constructor Details

#initialize(object, file) ⇒ ClassStatement

Initializes the Puppet class statement.

Parameters:

  • object (Puppet::Pops::Model::HostClassDefinition)

    The model object for the class statement.

  • file (String)

    The file containing the statement.



107
108
109
110
111
# File 'lib/puppet-strings/yard/parsers/puppet/statement.rb', line 107

def initialize(object, file)
  super
  @name = object.name
  @parent_class = object.parent_class
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



102
103
104
# File 'lib/puppet-strings/yard/parsers/puppet/statement.rb', line 102

def name
  @name
end

#parent_classObject (readonly)

Returns the value of attribute parent_class.



102
103
104
# File 'lib/puppet-strings/yard/parsers/puppet/statement.rb', line 102

def parent_class
  @parent_class
end