Sha256: 8d3e1c585ade988a70530d8365b694cac30afdb371e538073dcd419f625e39de

Contents?: true

Size: 510 Bytes

Versions: 46

Compression:

Stored size: 510 Bytes

Contents

#
# name.rb
#
# Returns a standardized form of a given resource name.
#
module Puppet::Parser::Functions
  newfunction(:name, :type => :rvalue, :doc => <<-EOS
This function returns a standardized form of a given resource name.
    EOS
) do |args|
    
    name = nil
    CORL.run do
      raise(Puppet::ParseError, "name(): Must have a resource name specified; " +
        "given (#{args.size} for 1)") if args.size < 1
      
      name = CORL::Util::Puppet.to_name(args[0])
    end
    return name
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
corl-0.5.18 lib/puppet/parser/functions/name.rb
corl-0.5.17 lib/puppet/parser/functions/name.rb
corl-0.5.16 lib/puppet/parser/functions/name.rb
corl-0.5.15 lib/puppet/parser/functions/name.rb
corl-0.5.14 lib/puppet/parser/functions/name.rb
corl-0.5.13 lib/puppet/parser/functions/name.rb
corl-0.5.12 lib/puppet/parser/functions/name.rb
corl-0.5.11 lib/puppet/parser/functions/name.rb
corl-0.5.10 lib/puppet/parser/functions/name.rb
corl-0.5.9 lib/puppet/parser/functions/name.rb
corl-0.5.8 lib/puppet/parser/functions/name.rb
corl-0.5.7 lib/puppet/parser/functions/name.rb
corl-0.5.6 lib/puppet/parser/functions/name.rb
corl-0.5.5 lib/puppet/parser/functions/name.rb
corl-0.5.4 lib/puppet/parser/functions/name.rb
corl-0.5.3 lib/puppet/parser/functions/name.rb
corl-0.5.2 lib/puppet/parser/functions/name.rb
corl-0.5.1 lib/puppet/parser/functions/name.rb
corl-0.5.0 lib/puppet/parser/functions/name.rb
corl-0.4.29 lib/puppet/parser/functions/name.rb