Class: Deplomat::LocalNode

Inherits:
Node
  • Object
show all
Defined in:
lib/deplomat/local_node.rb

Instance Attribute Summary

Attributes inherited from Node

#current_path, #log_to, #logfile, #raise_exceptions, #stdout_lines_to_ignore, #wrap_in

Instance Method Summary collapse

Methods inherited from Node

#adjusted_path, #cd, #clean, #copy, #create_dir, #create_file, #create_symlink, #current_requisite_number, #execute, #git_checkout, #git_merge, #git_pull, #git_push, #log, #move, #remove, #update_requisite_number!

Constructor Details

#initialize(logfile: "#{Dir.pwd}/deplomat.log", log_to: [:stdout], path: Dir.pwd, raise_exceptions: true) ⇒ LocalNode

Returns a new instance of LocalNode.



5
6
7
# File 'lib/deplomat/local_node.rb', line 5

def initialize(logfile: "#{Dir.pwd}/deplomat.log", log_to: [:stdout], path: Dir.pwd, raise_exceptions: true)
  super
end

Instance Method Details

#path_exist?(path, log_not_found: true) ⇒ Boolean Also known as: path_exists?, file_exists?

Returns:

  • (Boolean)


9
10
11
12
13
# File 'lib/deplomat/local_node.rb', line 9

def path_exist?(path, log_not_found: true)
  exists = File.exist?(adjusted_path(path))
  log "NOT FOUND: #{path}" if log_not_found && !exists
  exists
end