Sha256: 8f8d91f79a94da0517fdd431efc14a8f00d936a5941430454db2bb0b0691a39f

Contents?: true

Size: 380 Bytes

Versions: 21

Compression:

Stored size: 380 Bytes

Contents

module Puppet::Parser::Functions
  newfunction(:dirname, :type => :rvalue, :doc => <<-EOS
    Returns the dirname of a path.
    EOS
  ) do |arguments|

    raise(Puppet::ParseError, "dirname(): Wrong number of arguments " +
      "given (#{arguments.size} for 1)") if arguments.size < 1

    path = arguments[0]
    return File.dirname(path)
  end
end

# vim: set ts=2 sw=2 et :

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
bebox-0.0.1 lib/templates/puppet/step-0/modules/stdlib/lib/puppet/parser/functions/dirname.rb
freighthop-0.6.1 modules/stdlib/lib/puppet/parser/functions/dirname.rb
freighthop-0.6.0 modules/stdlib/lib/puppet/parser/functions/dirname.rb
freighthop-0.5.2 modules/stdlib/lib/puppet/parser/functions/dirname.rb
freighthop-0.5.1 modules/stdlib/lib/puppet/parser/functions/dirname.rb
freighthop-0.5.0 modules/stdlib/lib/puppet/parser/functions/dirname.rb
freighthop-0.4.1 modules/stdlib/lib/puppet/parser/functions/dirname.rb
freighthop-0.4.0 modules/stdlib/lib/puppet/parser/functions/dirname.rb
freighthop-0.3.3 modules/stdlib/lib/puppet/parser/functions/dirname.rb
freighthop-0.3.2 modules/stdlib/lib/puppet/parser/functions/dirname.rb
freighthop-0.3.1 modules/stdlib/lib/puppet/parser/functions/dirname.rb
freighthop-0.3.0 modules/stdlib/lib/puppet/parser/functions/dirname.rb
freighthop-0.2.1 modules/stdlib/lib/puppet/parser/functions/dirname.rb
freighthop-0.2.0 modules/stdlib/lib/puppet/parser/functions/dirname.rb
freighthop-0.1.0 modules/stdlib/lib/puppet/parser/functions/dirname.rb
freighthop-0.0.6 modules/stdlib/lib/puppet/parser/functions/dirname.rb
freighthop-0.0.5 modules/stdlib/lib/puppet/parser/functions/dirname.rb
freighthop-0.0.4 modules/stdlib/lib/puppet/parser/functions/dirname.rb
freighthop-0.0.3 modules/stdlib/lib/puppet/parser/functions/dirname.rb
freighthop-0.0.2 modules/stdlib/lib/puppet/parser/functions/dirname.rb