puppet-strings 2.4.0 → 2.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +97 -5
  3. data/COMMITTERS.md +17 -17
  4. data/CONTRIBUTING.md +6 -6
  5. data/README.md +10 -10
  6. data/lib/puppet-strings.rb +4 -2
  7. data/lib/puppet-strings/describe.rb +2 -0
  8. data/lib/puppet-strings/json.rb +2 -0
  9. data/lib/puppet-strings/markdown.rb +12 -10
  10. data/lib/puppet-strings/markdown/base.rb +17 -3
  11. data/lib/puppet-strings/markdown/data_type.rb +18 -0
  12. data/lib/puppet-strings/markdown/data_types.rb +3 -1
  13. data/lib/puppet-strings/markdown/defined_type.rb +2 -0
  14. data/lib/puppet-strings/markdown/defined_types.rb +3 -1
  15. data/lib/puppet-strings/markdown/function.rb +9 -7
  16. data/lib/puppet-strings/markdown/functions.rb +3 -1
  17. data/lib/puppet-strings/markdown/puppet_class.rb +2 -0
  18. data/lib/puppet-strings/markdown/puppet_classes.rb +3 -1
  19. data/lib/puppet-strings/markdown/puppet_plan.rb +2 -0
  20. data/lib/puppet-strings/markdown/puppet_plans.rb +3 -1
  21. data/lib/puppet-strings/markdown/puppet_task.rb +2 -0
  22. data/lib/puppet-strings/markdown/puppet_tasks.rb +3 -1
  23. data/lib/puppet-strings/markdown/resource_type.rb +21 -2
  24. data/lib/puppet-strings/markdown/resource_types.rb +3 -1
  25. data/lib/puppet-strings/markdown/table_of_contents.rb +3 -1
  26. data/lib/puppet-strings/markdown/templates/classes_and_defines.erb +10 -6
  27. data/lib/puppet-strings/markdown/templates/data_type.erb +22 -7
  28. data/lib/puppet-strings/markdown/templates/data_type_function.erb +67 -0
  29. data/lib/puppet-strings/markdown/templates/function.erb +2 -1
  30. data/lib/puppet-strings/markdown/templates/puppet_task.erb +1 -1
  31. data/lib/puppet-strings/markdown/templates/resource_type.erb +19 -13
  32. data/lib/puppet-strings/markdown/templates/table_of_contents.erb +6 -6
  33. data/lib/puppet-strings/monkey_patches/display_object_command.rb +2 -0
  34. data/lib/puppet-strings/tasks.rb +2 -0
  35. data/lib/puppet-strings/tasks/generate.rb +2 -0
  36. data/lib/puppet-strings/tasks/gh_pages.rb +3 -0
  37. data/lib/puppet-strings/version.rb +3 -1
  38. data/lib/puppet-strings/yard.rb +3 -0
  39. data/lib/puppet-strings/yard/code_objects.rb +2 -0
  40. data/lib/puppet-strings/yard/code_objects/base.rb +2 -0
  41. data/lib/puppet-strings/yard/code_objects/class.rb +4 -2
  42. data/lib/puppet-strings/yard/code_objects/data_type.rb +30 -8
  43. data/lib/puppet-strings/yard/code_objects/data_type_alias.rb +2 -0
  44. data/lib/puppet-strings/yard/code_objects/defined_type.rb +4 -2
  45. data/lib/puppet-strings/yard/code_objects/function.rb +6 -3
  46. data/lib/puppet-strings/yard/code_objects/group.rb +3 -0
  47. data/lib/puppet-strings/yard/code_objects/plan.rb +4 -2
  48. data/lib/puppet-strings/yard/code_objects/provider.rb +6 -0
  49. data/lib/puppet-strings/yard/code_objects/task.rb +2 -0
  50. data/lib/puppet-strings/yard/code_objects/type.rb +50 -5
  51. data/lib/puppet-strings/yard/handlers.rb +2 -0
  52. data/lib/puppet-strings/yard/handlers/helpers.rb +2 -0
  53. data/lib/puppet-strings/yard/handlers/json/base.rb +2 -0
  54. data/lib/puppet-strings/yard/handlers/json/task_handler.rb +2 -0
  55. data/lib/puppet-strings/yard/handlers/puppet/base.rb +3 -0
  56. data/lib/puppet-strings/yard/handlers/puppet/class_handler.rb +2 -0
  57. data/lib/puppet-strings/yard/handlers/puppet/data_type_alias_handler.rb +2 -0
  58. data/lib/puppet-strings/yard/handlers/puppet/defined_type_handler.rb +2 -0
  59. data/lib/puppet-strings/yard/handlers/puppet/function_handler.rb +3 -1
  60. data/lib/puppet-strings/yard/handlers/puppet/plan_handler.rb +2 -0
  61. data/lib/puppet-strings/yard/handlers/ruby/base.rb +5 -0
  62. data/lib/puppet-strings/yard/handlers/ruby/data_type_handler.rb +223 -60
  63. data/lib/puppet-strings/yard/handlers/ruby/function_handler.rb +9 -7
  64. data/lib/puppet-strings/yard/handlers/ruby/provider_handler.rb +13 -0
  65. data/lib/puppet-strings/yard/handlers/ruby/rsapi_handler.rb +4 -1
  66. data/lib/puppet-strings/yard/handlers/ruby/type_base.rb +20 -6
  67. data/lib/puppet-strings/yard/handlers/ruby/type_extras_handler.rb +16 -6
  68. data/lib/puppet-strings/yard/handlers/ruby/type_handler.rb +18 -1
  69. data/lib/puppet-strings/yard/parsers.rb +2 -0
  70. data/lib/puppet-strings/yard/parsers/json/parser.rb +2 -0
  71. data/lib/puppet-strings/yard/parsers/json/task_statement.rb +2 -0
  72. data/lib/puppet-strings/yard/parsers/puppet/parser.rb +18 -14
  73. data/lib/puppet-strings/yard/parsers/puppet/statement.rb +4 -0
  74. data/lib/puppet-strings/yard/tags.rb +2 -0
  75. data/lib/puppet-strings/yard/tags/enum_tag.rb +2 -0
  76. data/lib/puppet-strings/yard/tags/factory.rb +2 -0
  77. data/lib/puppet-strings/yard/tags/overload_tag.rb +4 -1
  78. data/lib/puppet-strings/yard/tags/parameter_directive.rb +5 -4
  79. data/lib/puppet-strings/yard/tags/property_directive.rb +5 -4
  80. data/lib/puppet-strings/yard/tags/summary_tag.rb +2 -0
  81. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/method_details_list.erb +6 -0
  82. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/setup.rb +9 -1
  83. data/lib/puppet-strings/yard/templates/default/puppet_function/html/setup.rb +1 -1
  84. data/lib/puppet-strings/yard/templates/default/puppet_type/html/setup.rb +3 -1
  85. data/lib/puppet-strings/yard/util.rb +4 -1
  86. data/lib/puppet/application/strings.rb +2 -0
  87. data/lib/puppet/face/strings.rb +4 -1
  88. data/lib/puppet/feature/rgen.rb +2 -0
  89. data/lib/puppet/feature/yard.rb +2 -0
  90. metadata +11 -52
  91. data/CODEOWNERS +0 -1
  92. data/Gemfile +0 -53
  93. data/HISTORY.md +0 -218
  94. data/JSON.md +0 -832
  95. data/Rakefile +0 -160
  96. data/codecov.yml +0 -3
  97. data/misc/ANNOUNCEMENT_TEMPLATE.md +0 -40
  98. data/spec/acceptance/emit_json_options_spec.rb +0 -69
  99. data/spec/acceptance/generate_markdown_spec.rb +0 -47
  100. data/spec/acceptance/running_strings_generate_spec.rb +0 -88
  101. data/spec/fixtures/acceptance/modules/test/functions/add.pp +0 -9
  102. data/spec/fixtures/acceptance/modules/test/lib/puppet/functions/4x_function.rb +0 -5
  103. data/spec/fixtures/acceptance/modules/test/lib/puppet/parser/functions/function3x.rb +0 -2
  104. data/spec/fixtures/acceptance/modules/test/lib/puppet/provider/server/linux.rb +0 -9
  105. data/spec/fixtures/acceptance/modules/test/lib/puppet/type/database.rb +0 -15
  106. data/spec/fixtures/acceptance/modules/test/manifests/init.pp +0 -31
  107. data/spec/fixtures/acceptance/modules/test/manifests/triple_nested_classes.pp +0 -27
  108. data/spec/fixtures/acceptance/modules/test/metadata.json +0 -10
  109. data/spec/fixtures/acceptance/modules/test/types/elephant.pp +0 -2
  110. data/spec/fixtures/unit/markdown/output.md +0 -561
  111. data/spec/fixtures/unit/markdown/output_with_data_types.md +0 -606
  112. data/spec/fixtures/unit/markdown/output_with_plan.md +0 -595
  113. data/spec/spec_helper.rb +0 -49
  114. data/spec/spec_helper_acceptance.rb +0 -58
  115. data/spec/spec_helper_acceptance_local.rb +0 -10
  116. data/spec/unit/puppet-strings/describe_spec.rb +0 -141
  117. data/spec/unit/puppet-strings/json_spec.rb +0 -302
  118. data/spec/unit/puppet-strings/markdown/base_spec.rb +0 -146
  119. data/spec/unit/puppet-strings/markdown_spec.rb +0 -374
  120. data/spec/unit/puppet-strings/yard/code_objects/task_spec.rb +0 -92
  121. data/spec/unit/puppet-strings/yard/handlers/json/task_handler_spec.rb +0 -116
  122. data/spec/unit/puppet-strings/yard/handlers/puppet/class_handler_spec.rb +0 -217
  123. data/spec/unit/puppet-strings/yard/handlers/puppet/data_type_alias_handler_spec.rb +0 -65
  124. data/spec/unit/puppet-strings/yard/handlers/puppet/defined_type_handler_spec.rb +0 -231
  125. data/spec/unit/puppet-strings/yard/handlers/puppet/function_handler_spec.rb +0 -315
  126. data/spec/unit/puppet-strings/yard/handlers/ruby/data_type_handler_spec.rb +0 -309
  127. data/spec/unit/puppet-strings/yard/handlers/ruby/function_handler_spec.rb +0 -746
  128. data/spec/unit/puppet-strings/yard/handlers/ruby/provider_handler_spec.rb +0 -158
  129. data/spec/unit/puppet-strings/yard/handlers/ruby/rsapi_handler_spec.rb +0 -235
  130. data/spec/unit/puppet-strings/yard/handlers/ruby/type_handler_spec.rb +0 -311
  131. data/spec/unit/puppet-strings/yard/parsers/json/parser_spec.rb +0 -72
  132. data/spec/unit/puppet-strings/yard/parsers/json/task_statement_spec.rb +0 -56
  133. data/spec/unit/puppet-strings/yard/parsers/puppet/parser_spec.rb +0 -251
  134. data/spec/unit/puppet-strings/yard/util_spec.rb +0 -48
@@ -1,15 +0,0 @@
1
- # @!puppet.type.param [value1, value2, value3] my_param Documentation for a dynamic parameter.
2
- # @!puppet.type.property [foo, bar, baz] my_prop Documentation for a dynamic property.
3
- Puppet::Type.newtype(:database) do
4
- desc 'An example server resource type.'
5
- feature :encryption, 'The provider supports encryption.', methods: [:encrypt]
6
-
7
- newparam(:address) do
8
- isnamevar
9
- desc 'The database server name.'
10
- end
11
-
12
- newproperty(:file) do
13
- desc 'The database file to use.'
14
- end
15
- end
@@ -1,31 +0,0 @@
1
- # Class: test
2
- #
3
- # This class exists to serve as fixture data for testing the puppet strings face
4
- #
5
- # @example
6
- # class { "test": }
7
- #
8
- # @param package_name The name of the package
9
- # @param service_name The name of the service
10
- # @param myenum
11
- # @enum myenum a Option A
12
- # @enum myenum b Option B
13
- class test (
14
- $package_name = $test::params::package_name,
15
- $service_name = $test::params::service_name,
16
- Enum['a', 'b'] $myenum = 'a',
17
-
18
- ) inherits test::params {
19
-
20
- # validate parameters here
21
-
22
- class { 'test::install': } ->
23
- class { 'test::config': } ~>
24
- class { 'test::service': } ->
25
- Class['test']
26
-
27
- File {
28
- owner => 'user',
29
- path => 'some/file/path',
30
- }
31
- }
@@ -1,27 +0,0 @@
1
- # Testing tested classes
2
- # docs stuff
3
- # @param nameservers [String] Don't ask me what this does!
4
- # @param default_lease_time [Integer[1024, 8192]] text goes here
5
- # @param max_lease_time does stuff
6
- class outer (
7
- $dnsdomain,
8
- $nameservers,
9
- $default_lease_time = 3600,
10
- $max_lease_time = 86400
11
- ) {
12
- # @param options [String[5,7]] gives user choices
13
- # @param multicast [Boolean] foobar
14
- # @param servers yep, that's right
15
- class middle (
16
- $options = "iburst",
17
- $servers,
18
- $multicast = false
19
- ) {
20
- class inner (
21
- $choices = "uburst",
22
- $secenekler = "weallburst",
23
- $boxen,
24
- $manyspell = true
25
- ) {}
26
- }
27
- }
@@ -1,10 +0,0 @@
1
- {
2
- "name": "username-test",
3
- "version": "0.0.1",
4
- "author": "username",
5
- "summary": "brief summary",
6
- "license": "MIT",
7
- "source": "git://github.com/not_a/real_repo.git",
8
- "dependencies": [
9
- ]
10
- }
@@ -1,2 +0,0 @@
1
- # A simple elephant type.
2
- type Test::Elephant = String[2]
@@ -1,561 +0,0 @@
1
- # Reference
2
- <!-- DO NOT EDIT: This document was generated by Puppet Strings -->
3
-
4
- ## Table of Contents
5
-
6
- **Classes**
7
-
8
- _Public Classes_
9
-
10
- * [`klass`](#klass): A simple class.
11
-
12
- _Private Classes_
13
-
14
- * `noparams`: Overview for class noparams
15
-
16
- **Defined types**
17
-
18
- * [`klass::dt`](#klassdt): A simple defined type.
19
-
20
- **Resource types**
21
-
22
- * [`apt_key`](#apt_key): Example resource type using the new API.
23
- * [`database`](#database): An example database server type.
24
-
25
- **Functions**
26
-
27
- * [`func`](#func): A simple Puppet function.
28
- * [`func3x`](#func3x): Documentation for an example 3.x function.
29
- * [`func4x`](#func4x): An example 4.x function.
30
- * [`func4x_1`](#func4x_1): An example 4.x function with only one signature.
31
-
32
- **Tasks**
33
-
34
- * [`(stdin)`](#(stdin)): Allows you to backup your database to local file.
35
-
36
- ## Classes
37
-
38
- ### klass
39
-
40
- An overview for a simple class.
41
-
42
- * **TODO** Do a thing
43
-
44
- * **Note** some note
45
-
46
- * **Since** 1.0.0
47
-
48
- * **See also**
49
- www.puppet.com
50
-
51
- #### Examples
52
-
53
- ##### This is an example
54
-
55
- ```puppet
56
- class { 'klass':
57
- param1 => 1,
58
- param3 => 'foo',
59
- }
60
- ```
61
-
62
- ##### This is another example
63
-
64
- ```puppet
65
- class { 'klass':
66
- param1 => 1,
67
- param3 => 'foo',
68
- }
69
- ```
70
-
71
- #### Parameters
72
-
73
- The following parameters are available in the `klass` class.
74
-
75
- ##### `param1`
76
-
77
- Data type: `Integer`
78
-
79
- First param.
80
-
81
- Default value: 1
82
-
83
- ##### `param2`
84
-
85
- Data type: `Any`
86
-
87
- Second param.
88
-
89
- Options:
90
-
91
- * **:opt1** `String`: something about opt1
92
- * **:opt2** `Hash`: a hash of stuff
93
-
94
- Default value: `undef`
95
-
96
- ##### `param3`
97
-
98
- Data type: `String`
99
-
100
- Third param.
101
-
102
- Default value: 'hi'
103
-
104
- ##### `param4`
105
-
106
- Data type: `Enum['one', 'two']`
107
-
108
- Fourth param.
109
-
110
- Options:
111
-
112
- * **:one**: One option
113
- * **:two**: Second option
114
-
115
- Default value: 'two'
116
-
117
- ## Defined types
118
-
119
- ### klass::dt
120
-
121
- An overview for a simple defined type.
122
-
123
- * **Since** 1.1.0
124
-
125
- * **See also**
126
- www.puppet.com
127
-
128
- #### Examples
129
-
130
- ##### Here's an example of this type:
131
-
132
- ```puppet
133
- klass::dt { 'foo':
134
- param1 => 33,
135
- param4 => false,
136
- }
137
- ```
138
-
139
- #### Parameters
140
-
141
- The following parameters are available in the `klass::dt` defined type.
142
-
143
- ##### `param1`
144
-
145
- Data type: `Integer`
146
-
147
- First param.
148
-
149
- Default value: 44
150
-
151
- ##### `param2`
152
-
153
- Data type: `Any`
154
-
155
- Second param.
156
-
157
- Options:
158
-
159
- * **:opt1** `String`: something about opt1
160
- * **:opt2** `Hash`: a hash of stuff
161
-
162
- ##### `param3`
163
-
164
- Data type: `String`
165
-
166
- Third param.
167
-
168
- Default value: 'hi'
169
-
170
- ##### `param4`
171
-
172
- Data type: `Boolean`
173
-
174
- Fourth param.
175
-
176
- Default value: `true`
177
-
178
- ##### `param5`
179
-
180
- Data type: `Enum['a', 'b']`
181
-
182
- Fifth param.
183
-
184
- Options:
185
-
186
- * **:a**: Option A
187
- * **:b**: Option B
188
-
189
- Default value: 'a'
190
-
191
- ## Resource types
192
-
193
- ### apt_key
194
-
195
- This type provides Puppet with the capabilities to manage GPG keys needed
196
- by apt to perform package validation. Apt has it's own GPG keyring that can
197
- be manipulated through the `apt-key` command.
198
- **Autorequires**:
199
- If Puppet is given the location of a key file which looks like an absolute
200
- path this type will autorequire that file.
201
-
202
- #### Examples
203
-
204
- ##### here's an example
205
-
206
- ```puppet
207
- apt_key { '6F6B15509CF8E59E6E469F327F438280EF8D349F':
208
- source => 'http://apt.puppetlabs.com/pubkey.gpg'
209
- }
210
- ```
211
-
212
- #### Properties
213
-
214
- The following properties are available in the `apt_key` type.
215
-
216
- ##### `ensure`
217
-
218
- Data type: `Enum[present, absent]`
219
-
220
- Whether this apt key should be present or absent on the target system.
221
-
222
- ##### `created`
223
-
224
- Data type: `String`
225
-
226
- Date the key was created, in ISO format.
227
-
228
- #### Parameters
229
-
230
- The following parameters are available in the `apt_key` type.
231
-
232
- ##### `id`
233
-
234
- namevar
235
-
236
- Data type: `Variant[Pattern[/A(0x)?[0-9a-fA-F]{8}Z/], Pattern[/A(0x)?[0-9a-fA-F]{16}Z/], Pattern[/A(0x)?[0-9a-fA-F]{40}Z/]]`
237
- _*this data type contains a regex that may not be accurately reflected in generated documentation_
238
-
239
- The ID of the key you want to manage.
240
-
241
- ### database
242
-
243
- An example database server type.
244
-
245
- #### Examples
246
-
247
- ##### here's an example
248
-
249
- ```puppet
250
- database { 'foo':
251
- address => 'qux.baz.bar',
252
- }
253
- ```
254
-
255
- #### Properties
256
-
257
- The following properties are available in the `database` type.
258
-
259
- ##### `ensure`
260
-
261
- Valid values: present, absent, up, down
262
-
263
- Aliases: "up"=>"present", "down"=>"absent"
264
-
265
- What state the database should be in.
266
-
267
- Options:
268
-
269
- * **:up**: Upstate
270
- * **:down**: Downstate
271
-
272
- Default value: up
273
-
274
- ##### `file`
275
-
276
- The database file to use.
277
-
278
- ##### `log_level`
279
-
280
- Valid values: debug, warn, error
281
-
282
- The log level to use.
283
-
284
- Default value: warn
285
-
286
- #### Parameters
287
-
288
- The following parameters are available in the `database` type.
289
-
290
- ##### `address`
291
-
292
- namevar
293
-
294
- The database server name.
295
-
296
- ##### `encryption_key`
297
-
298
- The encryption key to use.
299
-
300
- Required features: encryption.
301
-
302
- ##### `encrypt`
303
-
304
- Valid values: `true`, `false`, yes, no
305
-
306
- Whether or not to encrypt the database.
307
-
308
- Default value: `false`
309
-
310
- ## Functions
311
-
312
- ### func
313
-
314
- Type: Puppet Language
315
-
316
- A simple Puppet function.
317
-
318
- #### Examples
319
-
320
- ##### Test
321
-
322
- ```puppet
323
- $result = func(1, 2)
324
- ```
325
-
326
- #### `func(Integer $param1, Any $param2, String $param3 = hi, Enum['yes', 'no'] $param4 = 'yes')`
327
-
328
- A simple Puppet function.
329
-
330
- Returns: `Undef` Returns nothing.
331
-
332
- Raises:
333
- * `SomeError` this is some error
334
-
335
- ##### Examples
336
-
337
- ###### Test
338
-
339
- ```puppet
340
- $result = func(1, 2)
341
- ```
342
-
343
- ##### `param1`
344
-
345
- Data type: `Integer`
346
-
347
- First param.
348
-
349
- ##### `param2`
350
-
351
- Data type: `Any`
352
-
353
- Second param.
354
-
355
- ##### `param3`
356
-
357
- Data type: `String`
358
-
359
- Third param.
360
-
361
- Options:
362
-
363
- * **:param3opt** `Array`: Something about this option
364
-
365
- ##### `param4`
366
-
367
- Data type: `Enum['yes', 'no']`
368
-
369
- Fourth param.
370
-
371
- Options:
372
-
373
- * **:yes**: Yes option.
374
- * **:no**: No option.
375
-
376
- ### func3x
377
-
378
- Type: Ruby 3.x API
379
-
380
- Documentation for an example 3.x function.
381
-
382
- #### Examples
383
-
384
- ##### Calling the function.
385
-
386
- ```puppet
387
- func3x('hi', 10)
388
- ```
389
-
390
- #### `func3x(String $param1, Integer $param2)`
391
-
392
- Documentation for an example 3.x function.
393
-
394
- Returns: `Undef`
395
-
396
- ##### Examples
397
-
398
- ###### Calling the function.
399
-
400
- ```puppet
401
- func3x('hi', 10)
402
- ```
403
-
404
- ##### `param1`
405
-
406
- Data type: `String`
407
-
408
- The first parameter.
409
-
410
- ##### `param2`
411
-
412
- Data type: `Integer`
413
-
414
- The second parameter.
415
-
416
- ### func4x
417
-
418
- Type: Ruby 4.x API
419
-
420
- An example 4.x function.
421
-
422
- #### Examples
423
-
424
- ##### Calling the function
425
-
426
- ```puppet
427
- $result = func4x(1, 'foo')
428
- ```
429
-
430
- ##### Calling the function with all args
431
-
432
- ```puppet
433
- $result = func4x(1, 'foo', ['bar'])
434
- ```
435
-
436
- #### `func4x(Integer $param1, Any $param2, Optional[Array[String]] $param3, Optional[Enum[one, two]] $param4)`
437
-
438
- An overview for the first overload.
439
-
440
- Returns: `Undef` Returns nothing.
441
-
442
- ##### Examples
443
-
444
- ###### Calling the function foo
445
-
446
- ```puppet
447
- $result = func4x(1, 'foooo')
448
- ```
449
-
450
- ##### `param1`
451
-
452
- Data type: `Integer`
453
-
454
- The first parameter.
455
-
456
- ##### `param2`
457
-
458
- Data type: `Any`
459
-
460
- The second parameter.
461
-
462
- Options:
463
-
464
- * **:option** `String`: an option
465
- * **:option2** `String`: another option
466
-
467
- ##### `param3`
468
-
469
- Data type: `Optional[Array[String]]`
470
-
471
- The third parameter.
472
-
473
- ##### `param4`
474
-
475
- Data type: `Optional[Enum[one, two]]`
476
-
477
- The fourth parameter.
478
-
479
- Options:
480
-
481
- * **:one**: Option one.
482
- * **:two**: Option two.
483
-
484
- #### `func4x(Boolean $param, Callable &$block)`
485
-
486
- An overview for the second overload.
487
-
488
- Returns: `String` Returns a string.
489
-
490
- ##### Examples
491
-
492
- ###### Calling the function bar
493
-
494
- ```puppet
495
- $result = func4x(1, 'bar', ['foo'])
496
- ```
497
-
498
- ##### `param`
499
-
500
- Data type: `Boolean`
501
-
502
- The first parameter.
503
-
504
- ##### `&block`
505
-
506
- Data type: `Callable`
507
-
508
- The block parameter.
509
-
510
- ### func4x_1
511
-
512
- Type: Ruby 4.x API
513
-
514
- An example 4.x function with only one signature.
515
-
516
- #### `func4x_1(Integer $param1)`
517
-
518
- An example 4.x function with only one signature.
519
-
520
- Returns: `Undef` Returns nothing.
521
-
522
- ##### `param1`
523
-
524
- Data type: `Integer`
525
-
526
- The first parameter.
527
-
528
- ## Tasks
529
-
530
- ### (stdin)
531
-
532
- Allows you to backup your database to local file.
533
-
534
- **Supports noop?** false
535
-
536
- #### Parameters
537
-
538
- ##### `database`
539
-
540
- Data type: `Optional[String[1]]`
541
-
542
- Database to connect to
543
-
544
- ##### `user`
545
-
546
- Data type: `Optional[String[1]]`
547
-
548
- The user
549
-
550
- ##### `password`
551
-
552
- Data type: `Optional[String[1]]`
553
-
554
- The password
555
-
556
- ##### `sql`
557
-
558
- Data type: `String[1]`
559
-
560
- Path to file you want backup to
561
-