Class: Dtrace::StackRecord
- Inherits:
-
Object
- Object
- Dtrace::StackRecord
- Defined in:
- lib/dtrace/stackrecord.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#parse(raw) ⇒ Object
Given a stack as a string returned from DTrace, set the value of this record to a list of stack frames.
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
21 22 23 |
# File 'lib/dtrace/stackrecord.rb', line 21 def value @value end |
Instance Method Details
#parse(raw) ⇒ Object
Given a stack as a string returned from DTrace, set the value of this record to a list of stack frames.
25 26 27 28 |
# File 'lib/dtrace/stackrecord.rb', line 25 def parse(raw) frames = raw.split(/\n/) @value = frames.map {|f| f.lstrip }.select {|f| f.length > 0 } end |