Method: Retrospec::Puppet::Functions.create_function
- Defined in:
- lib/retrospec/plugins/v1/plugin/generators/parsers/function.rb
.create_function(func_name, function_base = nil, &block) ⇒ Object
for puppet 4 functions
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/retrospec/plugins/v1/plugin/generators/parsers/function.rb', line 14 def self.create_function(func_name, function_base = nil, &block) # the bundled version of puppet with this gem is quite old and is preventing me from creating a function # to get the actual properties of it. For now we can just skip the creation and stub enough functions # to get at the data. However, if we just eval the file we can probably bypass all this code and use class # methods instead #require 'puppet/pops' #f = ::Puppet::Functions.create_function(func_name, function_base, &block) block.call @model.name = func_name end |