module Kernel
Public Instance Methods
js_class()
click to toggle source
# File lib/ruby_run_js/helper.rb, line 133 def js_class return 'Undefined' if is_a?(RubyRunJs::JsUndefined) return 'Null' if is_a?(RubyRunJs::JsNull) return 'Boolean' if is_a?(TrueClass) || is_a?(FalseClass) return 'Number' if is_a?(Float) return 'String' if is_a?(String) self._class end
js_type()
click to toggle source
# File lib/ruby_run_js/helper.rb, line 122 def js_type return :Undefined if is_a?(RubyRunJs::JsUndefined) return :Null if is_a?(RubyRunJs::JsNull) return :Boolean if is_a?(TrueClass) || is_a?(FalseClass) return :Number if is_a?(Float) return :String if is_a?(String) return :Object if is_a?(RubyRunJs::JsBaseObject) :Native end
null()
click to toggle source
# File lib/ruby_run_js/helper.rb, line 142 def null RubyRunJs::JsNull.instance end
undefined()
click to toggle source
# File lib/ruby_run_js/helper.rb, line 146 def undefined RubyRunJs::JsUndefined.instance end