Class: Textus::CLI::Verb::ZoneMv

Inherits:
Textus::CLI::Verb show all
Defined in:
lib/textus/cli/verb/zone_mv.rb

Instance Attribute Summary

Attributes inherited from Textus::CLI::Verb

#positional

Instance Method Summary collapse

Methods inherited from Textus::CLI::Verb

command_name, #context_for, descendants, #emit, inherited, #initialize, needs_store?, option, options, parent_group, #parse, #resolved_role, #session_for

Constructor Details

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

Instance Method Details

#call(store) ⇒ Object



11
12
13
14
15
# File 'lib/textus/cli/verb/zone_mv.rb', line 11

def call(store)
  from = positional.shift or raise UsageError.new("zone mv requires <from> <to>")
  to   = positional.shift or raise UsageError.new("zone mv requires <from> <to>")
  emit(session_for(store).zone_mv(from: from, to: to, dry_run: dry_run || false).to_h)
end