Class: Object

Inherits:
BasicObject
Defined in:
lib/h8/value.rb,
lib/h8/context.rb

Overview

Ruby object’s t_ruby does nothing (tree conversion optimization)

Instance Method Summary collapse

Instance Method Details

#__js_enumerateObject



63
64
65
66
67
68
69
# File 'lib/h8/context.rb', line 63

def __js_enumerate
  if respond_to?(:keys)
    self.keys.map(&:to_s)
  else
    []
  end
end

#__js_has_property(name) ⇒ Object



59
60
61
# File 'lib/h8/context.rb', line 59

def __js_has_property name
  __js_enumerate.include?(name)
end

#__to_jsonObject



55
56
57
# File 'lib/h8/context.rb', line 55

def __to_json
  JSON.unparse self
end

#to_ruby(depth = 0) ⇒ Object

It is already a ruby object. Gate objects should override as need



223
224
225
# File 'lib/h8/value.rb', line 223

def to_ruby depth=0
  self
end