# class NameService::NameService::ObjectAdd

### Public Instance Methods

deletecmd() click to toggle source

    # File lib/puppet/provider/nameservice/objectadd.rb, line 5
    def deletecmd
      [command(:delete), @resource[:name]]
    end

flag(name) click to toggle source

Determine the flag to pass to our command.

    # File lib/puppet/provider/nameservice/objectadd.rb, line 10
    def flag(name)
      name = name.intern if name.is_a? String
      self.class.option(name, :flag) || "-" + name.to_s[0,1]
    end

modifycmd(param, value) click to toggle source

    # File lib/puppet/provider/nameservice/objectadd.rb, line 15
    def modifycmd(param, value)
      cmd = [command(param.to_s =~ /password_.+_age/ ? :password : :modify)]
      cmd << flag(param) << value
      if @resource.allowdupe? && ((param == :uid) || (param == :gid and self.class.name == :groupadd))
        cmd << "-o"
      end
      cmd << @resource[:name]

      cmd
    end

posixmethod(name) click to toggle source

    # File lib/puppet/provider/nameservice/objectadd.rb, line 26
    def posixmethod(name)
      name = name.intern if name.is_a? String
      method = self.class.option(name, :method) || name

      method
    end