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

#__to_jsonObject



24
25
26
27
28
29
30
# File 'lib/h8/context.rb', line 24

def __to_json
  if respond_to?(:as_json)
    as_json
  else
    JSON[JSON[self]]
  end
end

#to_ruby(depth = 0) ⇒ Object

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



219
220
221
# File 'lib/h8/value.rb', line 219

def to_ruby depth=0
  self
end