classes_and_defines.erb 1.18 KB
Newer Older
1 2
### <%= name %>

3 4 5 6 7 8 9
<% if text -%>
<%= text %>
<% elsif summary -%>
<%= summary %>
<% else -%>
<%= "The #{name} class." %>
<% end -%>
10

11 12 13 14 15 16 17 18
<% if todo -%>
* **TODO** <%= todo %>

<% end -%>
<% if note -%>
* **Note** <%= note %>

<% end -%>
19 20 21 22 23 24 25
<% if since -%>
* **Since** <%= since %>

<% end -%>
<% if see -%>
* **See also**
<% see.each do |sa| -%>
26
<% if sa[:name] -%>
27
<%= sa[:name] %>
28 29
<% end -%>
<% if sa[:text] -%>
30 31
<%= sa[:text] %>
<% end -%>
32
<% end -%>
33 34 35 36

<% end -%>
<% if examples -%>
#### Examples
37

38 39
<% examples.each do |eg| -%>
##### <%= eg[:name] %>
40

41 42 43 44 45 46
```puppet
<%= eg[:text] %>
```

<% end -%>
<% end -%>
47
<% if params -%>
48 49 50 51 52 53 54 55 56 57 58 59 60
#### Parameters

The following parameters are available in the `<%= name %>` <%= @type %>.

<% params.each do |param| -%>
##### `<%= param[:name] %>`

<% if param[:types] -%>
Data type: `<%= param[:types].join(', ') -%>`

<% end -%>
<%= param[:text] %>

61 62 63 64 65 66 67 68
<% if options_for_param(param[:name]) -%>
Options:

<% options_for_param(param[:name]).each do |o| -%>
* **<%= o[:opt_name] %>** `<%= o[:opt_types][0] %>`: <%= o[:opt_text] %>
<% end -%>

<% end -%>
69 70 71 72 73 74
<% if defaults && defaults[param[:name]] -%>
Default value: <%= value_string(defaults[param[:name]]) %>

<% end -%>
<% end -%>
<% end -%>