Class: ScoutApm::Utils::InstanceVar
- Inherits:
-
Object
- Object
- ScoutApm::Utils::InstanceVar
- Defined in:
- lib/scout_apm/utils/marshal_logging.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#obj ⇒ Object
readonly
Returns the value of attribute obj.
Instance Method Summary collapse
- #history ⇒ Object
-
#initialize(name, obj, parent) ⇒ InstanceVar
constructor
A new instance of InstanceVar.
- #to_s ⇒ Object
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
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/scout_apm/utils/marshal_logging.rb', line 6 def name @name end |
#obj ⇒ Object (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
#history ⇒ Object
19 20 21 |
# File 'lib/scout_apm/utils/marshal_logging.rb', line 19 def history (@parent.nil? ? [] : @parent.history) + [to_s] end |
#to_s ⇒ Object
15 16 17 |
# File 'lib/scout_apm/utils/marshal_logging.rb', line 15 def to_s "#{@name} - #{obj.class}" end |