Class: Textus::Action::KeyMv

Inherits:
WriteVerb show all
Extended by:
Contract::DSL
Defined in:
lib/textus/action/key_mv.rb

Instance Method Summary collapse

Methods included from Contract::DSL

arg, around, cli, cli_stdin, contract, contract?, summary, surfaces, verb, view

Methods inherited from Base

#args, inherited

Constructor Details

#initialize(old_key:, new_key:, dry_run: false) ⇒ KeyMv

Returns a new instance of KeyMv.



21
22
23
24
25
26
# File 'lib/textus/action/key_mv.rb', line 21

def initialize(old_key:, new_key:, dry_run: false)
  super()
  @old_key = old_key
  @new_key = new_key
  @dry_run = dry_run
end

Instance Method Details

#call(container:, call:) ⇒ Object



28
29
30
31
32
# File 'lib/textus/action/key_mv.rb', line 28

def call(container:, call:)
  run_with_cascade(cascade_target_key, container:, call:) do
    execute_move(container, call)
  end
end