Class: RemoveKey

Inherits:
Struct
  • Object
show all
Defined in:
lib/engine/app/lib/commands/remove_key.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#backendObject

Returns the value of attribute backend

Returns:

  • (Object)

    the current value of backend



1
2
3
# File 'lib/engine/app/lib/commands/remove_key.rb', line 1

def backend
  @backend
end

#keyObject

Returns the value of attribute key

Returns:

  • (Object)

    the current value of key



1
2
3
# File 'lib/engine/app/lib/commands/remove_key.rb', line 1

def key
  @key
end

Instance Method Details

#executeObject



2
3
4
5
6
# File 'lib/engine/app/lib/commands/remove_key.rb', line 2

def execute
  Authorization.execute_if_authorized_for(:remove_content) do
    backend.del(key)
  end
end