Class: PuppetStrings::Yard::Parsers::Puppet::ParameterizedStatement

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

Overview

Implements a parameterized statement (a statement that takes parameters).

Defined Under Namespace

Classes: Parameter

Constant Summary

Constants inherited from Statement

Statement::COMMENT_REGEX

Instance Attribute Summary collapse

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) ⇒ ParameterizedStatement

Initializes the parameterized statement.

Parameters:

  • object

    The Puppet parser model object that has parameters.

  • file (String)

    The file containing the statement.



94
95
96
97
# File 'lib/puppet-strings/yard/parsers/puppet/statement.rb', line 94

def initialize(object, file)
  super
  @parameters = object.parameters.map { |parameter| Parameter.new(parameter) }
end

Instance Attribute Details

#parametersObject (readonly)

Returns the value of attribute parameters.



89
90
91
# File 'lib/puppet-strings/yard/parsers/puppet/statement.rb', line 89

def parameters
  @parameters
end