Object
# File lib/compass/configuration/watch.rb, line 8 def initialize(glob, &block) unless block raise ArgumentError, "A Block must be supplied in order to be watched" end @callback = block unless glob raise ArgumentErrorn, "A glob must be supplied in order to be watched" end @glob = glob if Pathname.new(glob).absolute? @full_glob = glob else @full_glob = File.join(Compass.configuration.project_path, glob) end end
# File lib/compass/configuration/watch.rb, line 33 def match?(changed_path) File.fnmatch(full_glob, changed_path, File::FNM_PATHNAME) end
Generated with the Darkfish Rdoc Generator 2.