Method: Retrospec::Puppet::Generators::FunctionGenerator#v4_function?

Defined in:
lib/retrospec/plugins/v1/plugin/generators/function_generator.rb

#v4_function?(function_file) ⇒ Boolean

Returns true if the function file is a v4 function.

Returns:

  • (Boolean)

    true if the function file is a v4 function



190
191
192
193
# File 'lib/retrospec/plugins/v1/plugin/generators/function_generator.rb', line 190

def v4_function?(function_file)
  # mod_name/lib/puppet/functions
  File.basename(Pathname.new(function_file).parent.parent) == 'functions'
end