Module: EacRubyBase0::RunnerWith::FilesystemTraverser::TopMethods

Defined in:
lib/eac_ruby_base0/runner_with/filesystem_traverser.rb

Instance Method Summary collapse

Instance Method Details

#on_none_path_informedObject



26
27
28
# File 'lib/eac_ruby_base0/runner_with/filesystem_traverser.rb', line 26

def on_none_path_informed
  infom 'Warning: none path informed'
end

#pathsObject



30
31
32
# File 'lib/eac_ruby_base0/runner_with/filesystem_traverser.rb', line 30

def paths
  parsed.paths.map(&:to_pathname)
end

#run_filesystem_traverserObject



34
35
36
37
38
39
40
# File 'lib/eac_ruby_base0/runner_with/filesystem_traverser.rb', line 34

def run_filesystem_traverser
  if parsed.paths.any?
    parsed.paths.each { |path| traverser_check_path(path) }
  else
    on_none_path_informed
  end
end

#traverser_recursiveObject



42
43
44
45
46
47
48
# File 'lib/eac_ruby_base0/runner_with/filesystem_traverser.rb', line 42

def traverser_recursive
  return false if parsed.no_recursive?
  return true if parsed.recursive?

  setting_value(:default_traverser_recursive, required: false)
    .if_not_nil(DEFAULT_DEFAULT_TRAVERSER_RECURSIVE)
end