Class: ScoutApm::Utils::InstanceVar

Inherits:
Object
  • Object
show all
Defined in:
lib/scout_apm/utils/marshal_logging.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, obj, parent) ⇒ InstanceVar

Returns a new instance of InstanceVar.



9
10
11
12
13
# File 'lib/scout_apm/utils/marshal_logging.rb', line 9

def initialize(name, obj, parent)
  @name = name
  @obj = obj
  @parent = parent
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



6
7
8
# File 'lib/scout_apm/utils/marshal_logging.rb', line 6

def name
  @name
end

#objObject (readonly)

Returns the value of attribute obj.



7
8
9
# File 'lib/scout_apm/utils/marshal_logging.rb', line 7

def obj
  @obj
end

Instance Method Details

#historyObject



19
20
21
# File 'lib/scout_apm/utils/marshal_logging.rb', line 19

def history
  (@parent.nil? ? [] : @parent.history) + [to_s]
end

#to_sObject



15
16
17
# File 'lib/scout_apm/utils/marshal_logging.rb', line 15

def to_s
  "#{@name} - #{obj.class}"
end