lib/opal/jquery/constants.rb in opal-jquery-0.4.0 vs lib/opal/jquery/constants.rb in opal-jquery-0.4.1
- old
+ new
@@ -1,13 +1,13 @@
require 'native'
unless defined?(JQUERY_CLASS)
case
- when $$[:jQuery]
- JQUERY_CLASS = JQUERY_SELECTOR = $$[:jQuery]
- when $$[:Zepto] then
- JQUERY_SELECTOR = $$[:Zepto]
- JQUERY_CLASS = $$[:Zepto][:zepto][:Z]
+ when `!!Opal.global.jQuery`
+ JQUERY_CLASS = JQUERY_SELECTOR = `Opal.global.jQuery`
+ when `!!Opal.global.Zepto`
+ JQUERY_SELECTOR = `Opal.global.Zepto`
+ JQUERY_CLASS = `Opal.global.Zepto.zepto.Z`
else
- raise NameError, 'Can\'t find jQuery or Zepto. jQuery must be included before opal-jquery'
+ raise NameError, "Can't find jQuery or Zepto. jQuery must be included before opal-jquery"
end
end