Method: Watchful::Action#has_dependencies?

Defined in:
lib/watchful/action.rb

#has_dependencies?Boolean

Returns:

  • (Boolean)


41
42
43
44
45
46
47
48
49
# File 'lib/watchful/action.rb', line 41

def has_dependencies?
	return true if @dependencies.empty?
	have_all = @dependencies.any? do |d|
		(Action.have_command?(d)) || (File.exists?(File.expand_path(d)))
	end
	# todo: more detailed messages about missing dependencies
	puts "Missing dependencies for action \"#{@name}\"" unless have_all
	return have_all
end