Class: DTK::Network::Client::Command::RemoveFromGroup
- Inherits:
-
DTK::Network::Client::Command
- Object
- DTK::Network::Client::Command
- DTK::Network::Client::Command::RemoveFromGroup
- Defined in:
- lib/client/command/remove_from_group.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(group, user, options = {}) ⇒ RemoveFromGroup
constructor
A new instance of RemoveFromGroup.
- #revoke_access ⇒ Object
Methods inherited from DTK::Network::Client::Command
Methods included from RestWrapper
#rest_delete, #rest_get, #rest_post
Methods included from Client::PermissionsUtil
Methods included from Util::Tar
Constructor Details
#initialize(group, user, options = {}) ⇒ RemoveFromGroup
Returns a new instance of RemoveFromGroup.
4 5 6 7 |
# File 'lib/client/command/remove_from_group.rb', line 4 def initialize(group, user, = {}) @group = group @user = user end |
Class Method Details
.run(group, user, opts = {}) ⇒ Object
9 10 11 |
# File 'lib/client/command/remove_from_group.rb', line 9 def self.run(group, user, opts = {}) new(group, user, opts).revoke_access end |
Instance Method Details
#revoke_access ⇒ Object
13 14 15 16 |
# File 'lib/client/command/remove_from_group.rb', line 13 def revoke_access rest_post("groups/#{@group}/remove_member", { name: @group, username: @user }) nil end |