Class: Cue::Command::Delete
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(args) ⇒ Delete
constructor
A new instance of Delete.
- #nargs ⇒ Object
Methods inherited from Base
#find_item, #find_key, #parser
Constructor Details
#initialize(args) ⇒ Delete
Returns a new instance of Delete.
6 7 8 9 |
# File 'lib/cue/command/delete.rb', line 6 def initialize(args) super(args) @sha = @args.first end |
Instance Method Details
#execute ⇒ Object
11 12 13 14 |
# File 'lib/cue/command/delete.rb', line 11 def execute item_key = find_key(@sha) .store.delete(item_key) end |
#nargs ⇒ Object
16 17 18 |
# File 'lib/cue/command/delete.rb', line 16 def nargs 1 end |