Class: Textus::CLI::Delete

Inherits:
Verb
  • Object
show all
Defined in:
lib/textus/cli/delete.rb

Instance Attribute Summary

Attributes inherited from Verb

#positional

Instance Method Summary collapse

Methods inherited from Verb

#emit, inherited, #initialize, needs_store?, option, options, #parse

Constructor Details

This class inherits a constructor from Textus::CLI::Verb

Instance Method Details

#call(store) ⇒ Object



7
8
9
10
11
# File 'lib/textus/cli/delete.rb', line 7

def call(store)
  key = positional.shift or raise UsageError.new("delete requires a key")
  role = Role.resolve(flag: as_flag, env: ENV, root: store.root)
  emit(store.delete(key, if_etag: if_etag, as: role))
end