lib/guard/dsl.rb
# Evaluate the DSL methods in the `Guardfile`.
#
# @param [Hash] options the Guard options
# @option options [Array<Symbol,String>] groups the groups to evaluate
# @option options [String] guardfile the path to a valid Guardfile
# @option options [String] guardfile_contents a string representing the content of a valid Guardfile
# @raise [ArgumentError] when options are not a Hash
#
Evaluate the DSL methods in the `Guardfile`.
Evaluate the DSL methods in the ` Guardfile ` .
def evaluate_guardfile(options = {})
        raise ArgumentError.new('No option hash passed to evaluate_guardfile!') unless options.is_a?(Hash)
        @@options = options.dup
        fetch_guardfile_contents
        instance_eval_guardfile(guardfile_contents_with_user_config)
        UI.error 'No guards found in Guardfile, please add at least one.' if !::Guard.guards.nil? && ::Guard.guards.empty?
      end
def evaluate_guardfile ( options = { } ) raise ArgumentError . new ( 'No option hash passed to evaluate_guardfile!' ) unless options . is_a? ( Hash ) @@options = options . dup fetch_guardfile_contents instance_eval_guardfile ( guardfile_contents_with_user_config ) UI . error 'No guards found in Guardfile, please add at least one.' if ! :: Guard . guards . nil? && :: Guard . guards . empty? end
Evaluate the DSL methods in the `Guardfile`.
Evaluate the DSL methods in the ` Guardfile ` .
[ArgumentError] when options are not a Hash
[ ArgumentError ] when options are not a Hash
options
guardfile_contents a string representing the content of a valid Guardfile
guardfile_contents a string representing the content of a valid Guardfile
options the Guard options
options the Guard options