class PuppetX::PuppetLabs::Strings::YARD::Handlers::Puppet3xFunctionHandler

Private Instance Methods

function_namespace() click to toggle source

Returns a {PuppetNamespaceObject} for holding functions. Creates this object if necessary.

@return [PuppetNamespaceObject]

# File lib/puppet_x/puppetlabs/strings/yard/handlers/puppet_3x_function_handler.rb, line 39
def function_namespace
  # NOTE: This tricky. If there is ever a Ruby class or module with the
  # name ::Puppet3xFunctions, then there will be a clash. Hopefully the name
  # is sufficiently uncommon.
  obj = P(:root, 'Puppet3xFunctions')
  if obj.is_a? Proxy
    namespace_obj = PuppetNamespaceObject.new(:root, 'Puppet3xFunctions')
    namespace_obj.add_tag YARD::Tags::Tag.new(:api, 'public')

    register namespace_obj
  end

  obj
end