class Guard::Guardfile::Evaluator

def guardfile_include?(plugin_name)

Returns:
  • (Boolean) - whether the Guard plugin has been declared

Parameters:
  • plugin_name (String) -- the name of the Guard

Other tags:
    Example: Programmatically test if a Guardfile contains a specific Guard plugin -
def guardfile_include?(plugin_name)
  _guardfile_contents_without_user_config.match(/^guard\s*\(?\s*['":]#{ plugin_name }['"]?/)
end