Class: Object

Inherits:
BasicObject
Defined in:
lib/gg/core.rb

Instance Method Summary collapse

Instance Method Details

#to_hi_html(history) ⇒ Object



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/gg/core.rb', line 52

def to_hi_html(history)
  return "...recursive..." if history[self]
  history[self] = true
  if self.instance_variables.size == 0                                                        
    GG.render('slim/object.slim',
      object: self, 
      classname: "hi-#{ self.class }", 
      history: history
    )
  else
    GG.render('slim/object_with_instance_variables.slim', 
      object: self, 
      classname: "hi-#{ self.class }", 
      history: history
    )
  end
  # Rack::Utils.escape_html( self.inspect )
rescue => e
  gg_render_error(e)
end