lib/rantly.rb in rantly-1.2.0 vs lib/rantly.rb in rantly-2.0.0

- old
+ new

@@ -1,15 +1,15 @@ -$:.unshift(File.dirname(__FILE__)) unless - $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__))) +$LOAD_PATH.unshift(File.dirname(__FILE__)) unless + $LOAD_PATH.include?(File.dirname(__FILE__)) || $LOAD_PATH.include?(__dir__) class Rantly end require 'rantly/generator' -def Rantly(n=1,&block) +def Rantly(n = 1, &block) if n > 1 - Rantly.map(n,&block) + Rantly.map(n, &block) else Rantly.value(&block) end end