lib/all/sugarcube/look_in.rb in sugarcube-3.0.0 vs lib/all/sugarcube/look_in.rb in sugarcube-3.0.1
- old
+ new
@@ -1,17 +1,12 @@
-module SugarCube
- module_function
-
- def look_in(where, here, here__deprecated={})
- return here[where] if here.has_key? where
- if here__deprecated[where]
- translated = here__deprecated[where]
- SugarCube.log("The symbol #{where.inspect} has been deprecated in favor of #{translated.inspect}")
- return here[translated]
- end
- raise SugarCubeNotFoundException.new(where.inspect)
+def SugarCube.look_in(where, here, here__deprecated={})
+ return here[where] if here.has_key? where
+ if here__deprecated[where]
+ translated = here__deprecated[where]
+ SugarCube.log("The symbol #{where.inspect} has been deprecated in favor of #{translated.inspect}")
+ return here[translated]
end
-
+ raise SugarCubeNotFoundException.new(where.inspect)
end
class SugarCubeNotFoundException < Exception
end