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



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) ⇒ Boolean Also known as: path_exists?, file_exists?



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

def path_exist?(path)
  exists = File.exist?(adjusted_path(path))
  print_to_terminal((exists ? "EXISTS: #{path}" : "NOT FOUND: #{path}"))
  exists
end