lib/wolverine/path_component.rb in wolverine-0.3.4 vs lib/wolverine/path_component.rb in wolverine-0.3.5
- old
+ new
@@ -48,11 +48,11 @@
def directory?(path)
File.directory?(path)
end
def file?(path)
- File.exists?(path) && !File.directory?(path)
+ File.exist?(path) && !File.directory?(path)
end
def define_directory_method path, sym
options = @options.merge({:cache_to => nil})
dir = PathComponent.new(path, options)
@@ -62,10 +62,10 @@
end
def define_script_method path, sym, *args
redis, options = @redis, @options.merge({:cache_to => nil})
script = Wolverine::Script.new(path, options)
- cb = proc { |*args| script.call(redis, *args) }
+ cb = proc { |*cb_args| script.call(redis, *cb_args) }
define_metaclass_method(sym, &cb)
cache_metaclass_method(sym, &cb)
end
def define_metaclass_method sym, &block