Class: Heapy::Alive::RootTracker

Inherits:
Object
  • Object
show all
Defined in:
lib/heapy/alive.rb

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ RootTracker

Returns a new instance of RootTracker.



200
201
202
# File 'lib/heapy/alive.rb', line 200

def initialize(json)
  @raw_json_hash = json
end

Instance Method Details

#addressObject



216
217
218
# File 'lib/heapy/alive.rb', line 216

def address
  raise "root does not have an address"
end

#id2refObject



208
209
210
# File 'lib/heapy/alive.rb', line 208

def id2ref
  raise "cannot turn root object into an object"
end

#object_retained?Boolean

Returns:

  • (Boolean)


220
221
222
# File 'lib/heapy/alive.rb', line 220

def object_retained?
  true
end

#referencesObject



204
205
206
# File 'lib/heapy/alive.rb', line 204

def references
  []
end

#root?Boolean

Returns:

  • (Boolean)


212
213
214
# File 'lib/heapy/alive.rb', line 212

def root?
  true
end

#tracked_to_sObject



224
225
226
# File 'lib/heapy/alive.rb', line 224

def tracked_to_s
  "ROOT"
end