Module: Superhosting::Patches::PathMapper::DirNode

Includes:
Helper::Logger
Defined in:
lib/superhosting/patches/path_mapper/dir_node.rb

Instance Method Summary collapse

Methods included from Helper::Logger

#__debug, #__dry_run, #__dry_run=, #__logger, #__logger=, #debug, #debug_block, #debug_operation, #indent, #indent=, #indent_reset, #indent_step, #indent_step_back, #info, #storage, #t, #with_dry_run, #with_indent, #with_logger

Instance Method Details

#_delete!(full: false) ⇒ Object



7
8
9
10
11
# File 'lib/superhosting/patches/path_mapper/dir_node.rb', line 7

def _delete!(full: false)
  self.debug_operation(desc: { code: :directory, data: { path: @path } }) do |&blk|
    super.tap {|res| blk.call(code: res[:code], diff: res[:d][:diff]) }
  end
end

#_rename!(new_path) ⇒ Object



13
14
15
16
17
# File 'lib/superhosting/patches/path_mapper/dir_node.rb', line 13

def _rename!(new_path)
  self.debug_operation(desc: { code: :directory, data: { path: @path, to: new_path } }) do |&blk|
    super.tap {|res| blk.call(code: res[:code], diff: res[:d][:diff]) }
  end
end