Sha256: ae11fe805255398cc09272c6da093172a6b1ecfbcbf3c14874680fe05376d81f

Contents?: true

Size: 993 Bytes

Versions: 5

Compression:

Stored size: 993 Bytes

Contents

# Initializes the template.
# @return [void]
def init
  sections :header, :box_info, :summary, :overview, :note, :todo, T('tags'), :properties, :parameters, :features
end

# Renders the box_info section.
# @return [String] Returns the rendered section.
def box_info
  @providers = PuppetStrings::Yard::CodeObjects::Providers.instance(object.name).children
  erb(:box_info)
end

# Renders the properties section.
# @return [String] Returns the rendered section.
def properties
  # Properties are the same thing as parameters (from the documentation standpoint),
  # so reuse the same template but with a different title and data source.
  @parameters = object.properties || []
  @parameters.sort_by! { |p| p.name }
  @tag_title = 'Properties'
  erb(:parameters)
end

# Renders the parameters section.
# @return [String] Returns the rendered section.
def parameters
  @parameters = object.parameters || []
  @parameters.sort_by! { |p| p.name }
  @tag_title = 'Parameters'
  erb(:parameters)
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
puppet-strings-2.4.0 lib/puppet-strings/yard/templates/default/puppet_type/html/setup.rb
puppet-strings-2.3.1 lib/puppet-strings/yard/templates/default/puppet_type/html/setup.rb
puppet-strings-2.3.0 lib/puppet-strings/yard/templates/default/puppet_type/html/setup.rb
puppet-strings-2.2.0 lib/puppet-strings/yard/templates/default/puppet_type/html/setup.rb
puppet-strings-2.1.0 lib/puppet-strings/yard/templates/default/puppet_type/html/setup.rb