Class: PuppetReadmeGenerator::Param
- Inherits:
-
Object
- Object
- PuppetReadmeGenerator::Param
- Defined in:
- lib/puppet_readme_generator.rb
Instance Method Summary collapse
-
#initialize(t, p) ⇒ Param
constructor
A new instance of Param.
- #markdown ⇒ Object
Constructor Details
#initialize(t, p) ⇒ Param
Returns a new instance of Param.
153 154 155 156 |
# File 'lib/puppet_readme_generator.rb', line 153 def initialize(t, p) @t = t @p = p end |
Instance Method Details
#markdown ⇒ Object
158 159 160 161 162 163 164 165 166 167 |
# File 'lib/puppet_readme_generator.rb', line 158 def markdown output = [] output << "##### `#{@t['name']}`\n" output << "* #{@t['text']}" output << "* Type: `#{@t['types']}`" default = @p.defaults[@t['name']] output << "* Default: `#{default}`" unless default.nil? output << '' output.join("\n") end |