class PuppetReadmeGenerator::Param
Public Class Methods
new(t, p)
click to toggle source
# File lib/puppet_readme_generator.rb, line 187 def initialize(t, p) @t = t @p = p end
Public Instance Methods
markdown()
click to toggle source
# File lib/puppet_readme_generator.rb, line 192 def markdown output = [] output << "##### `#{@t['name']}`\n" if not @t['text'].nil? and @t['text'].length > 0 output << "* #{@t['text']}" end ptype = @t['types'] if not ptype.nil? and ptype.length > 1 output << "* Type: `#{ptype}`" elsif not ptype.nil? and ptype.length == 1 output << "* Type: `#{ptype.first}`" end default = @p.defaults[@t['name']] output << "* Default: `#{default}`" unless default.nil? output << '' output.join("\n") end