Lazy isn't in 1.9.3 :(

This commit is contained in:
Thomas Reynolds 2014-08-24 17:35:02 -07:00
parent 84acb50b02
commit 1d5ae59db9

View file

@ -168,7 +168,6 @@ module Middleman
Contract Symbol, String, Maybe[Bool] => Maybe[SourceFile]
def find(type, path, glob=false)
watchers
.lazy
.select { |d| d.type == type }
.map { |d| d.find(path, glob) }
.reject { |d| d.nil? }
@ -183,7 +182,6 @@ module Middleman
Contract Symbol, String => Bool
def exists?(type, path)
watchers
.lazy
.select { |d| d.type == type }
.any? { |d| d.exists?(path) }
end
@ -196,7 +194,6 @@ module Middleman
Contract Symbol, String => Maybe[HANDLER]
def watcher_for_path(type, path)
watchers
.lazy
.select { |d| d.type == type }
.find { |d| d.exists?(path) }
end