diff --git a/lib/puppet-strings/yard/parsers/puppet/statement.rb b/lib/puppet-strings/yard/parsers/puppet/statement.rb index 07102494..f61568e8 100644 --- a/lib/puppet-strings/yard/parsers/puppet/statement.rb +++ b/lib/puppet-strings/yard/parsers/puppet/statement.rb @@ -92,7 +92,7 @@ def initialize(parameter) # @param object The Puppet parser model object that has parameters. # @param [String] file The file containing the statement. def initialize(object, file) - super(object, file) + super @parameters = object.parameters.map { |parameter| Parameter.new(parameter) } end end @@ -105,7 +105,7 @@ class ClassStatement < ParameterizedStatement # @param [Puppet::Pops::Model::HostClassDefinition] object The model object for the class statement. # @param [String] file The file containing the statement. def initialize(object, file) - super(object, file) + super @name = object.name @parent_class = object.parent_class end @@ -119,7 +119,7 @@ class DefinedTypeStatement < ParameterizedStatement # @param [Puppet::Pops::Model::ResourceTypeDefinition] object The model object for the defined type statement. # @param [String] file The file containing the statement. def initialize(object, file) - super(object, file) + super @name = object.name end end @@ -132,7 +132,7 @@ class FunctionStatement < ParameterizedStatement # @param [Puppet::Pops::Model::FunctionDefinition] object The model object for the function statement. # @param [String] file The file containing the statement. def initialize(object, file) - super(object, file) + super @name = object.name return unless object.respond_to? :return_type @@ -151,7 +151,7 @@ class PlanStatement < ParameterizedStatement # @param [Puppet::Pops::Model::PlanDefinition] object The model object for the plan statement. # @param [String] file The file containing the statement. def initialize(object, file) - super(object, file) + super @name = object.name end end @@ -164,7 +164,7 @@ class DataTypeAliasStatement < Statement # @param [Puppet::Pops::Model::TypeAlias] object The model object for the type statement. # @param [String] file The file containing the statement. def initialize(object, file) - super(object, file) + super type_expr = object.type_expr case type_expr diff --git a/lib/puppet-strings/yard/tags/overload_tag.rb b/lib/puppet-strings/yard/tags/overload_tag.rb index 8ae29425..04d0431f 100644 --- a/lib/puppet-strings/yard/tags/overload_tag.rb +++ b/lib/puppet-strings/yard/tags/overload_tag.rb @@ -65,7 +65,7 @@ def has_tag?(name) # rubocop:disable Naming/PredicateName # @param [Object] value The object to associate with this tag. # @return [void] def object=(value) - super(value) + super @docstring.object = value @docstring.tags.each { |tag| tag.object = value } end