Class: User
- Inherits:
-
Object
- Object
- User
- Defined in:
- lib/teuton/case_manager/case/builtin/user.rb
Instance Attribute Summary collapse
-
#param ⇒ Object
Returns the value of attribute param.
Instance Method Summary collapse
- #exists? ⇒ Boolean
-
#initialize(parent) ⇒ User
constructor
A new instance of User.
- #is_member_of?(groupname) ⇒ Boolean
Constructor Details
#initialize(parent) ⇒ User
Returns a new instance of User.
5 6 7 |
# File 'lib/teuton/case_manager/case/builtin/user.rb', line 5 def initialize(parent) @parent = parent end |
Instance Attribute Details
#param ⇒ Object
Returns the value of attribute param.
3 4 5 |
# File 'lib/teuton/case_manager/case/builtin/user.rb', line 3 def param @param end |
Instance Method Details
#exists? ⇒ Boolean
9 10 11 12 13 |
# File 'lib/teuton/case_manager/case/builtin/user.rb', line 9 def exists? @parent.target("User #{@param} exists?") @parent.run "id #{@param}" @parent.expect_one @param end |
#is_member_of?(groupname) ⇒ Boolean
15 16 17 18 19 |
# File 'lib/teuton/case_manager/case/builtin/user.rb', line 15 def is_member_of?(groupname) @parent.target("User #{@param} is member of #{groupname}?") @parent.run "id #{@param}" @parent.expect_one [@param, groupname] end |