Sha256: 6fe025524482eec7b1ec41b448ab4259bc7e3a16b96ebf0e56d091e4c0636a49

Contents?: true

Size: 508 Bytes

Versions: 8

Compression:

Stored size: 508 Bytes

Contents

class User
  def initialize(teuton_host, param)
    @teuton_host = teuton_host
    @parent = teuton_host.parent
    @host = teuton_host.host
    @param = param
  end

  def exists?
    @parent.target("User #{@param} exists?")
    @parent.run "id #{@param}", on: @host
    @parent.expect_one [ 'uid=', @param ]
  end

  def is_member_of?(groupname)
    @parent.target("User #{@param} is member of #{groupname}?")
    @parent.run "id #{@param}", on: @host
    @parent.expect_one [@param, groupname]
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
teuton-2.3.6 lib/teuton/case_manager/case/builtin/user.rb
teuton-2.3.5 lib/teuton/case_manager/case/builtin/user.rb
teuton-2.3.4 lib/teuton/case_manager/case/builtin/user.rb
teuton-2.3.3 lib/teuton/case_manager/case/builtin/user.rb
teuton-2.3.2 lib/teuton/case_manager/case/builtin/user.rb
teuton-2.3.1 lib/teuton/case_manager/case/builtin/user.rb
teuton-2.2.2 lib/teuton/case_manager/case/builtin/user.rb
teuton-2.1.11 lib/teuton/case_manager/case/builtin/user.rb