Class: Errplane::Backtrace
- Inherits:
-
Object
- Object
- Errplane::Backtrace
- Defined in:
- lib/errplane/backtrace.rb
Defined Under Namespace
Classes: Line
Instance Attribute Summary collapse
-
#lines ⇒ Object
readonly
Returns the value of attribute lines.
Instance Method Summary collapse
-
#initialize(backtrace) ⇒ Backtrace
constructor
A new instance of Backtrace.
- #inspect ⇒ Object
- #to_a ⇒ Object
Constructor Details
#initialize(backtrace) ⇒ Backtrace
Returns a new instance of Backtrace.
25 26 27 28 29 30 31 32 |
# File 'lib/errplane/backtrace.rb', line 25 def initialize(backtrace) @lines = Array(backtrace).each.collect do |line| Errplane.configuration.backtrace_filters.each do |filter| line = filter.call(line) end Line.new(line) end end |
Instance Attribute Details
#lines ⇒ Object (readonly)
Returns the value of attribute lines.
23 24 25 |
# File 'lib/errplane/backtrace.rb', line 23 def lines @lines end |
Instance Method Details
#inspect ⇒ Object
38 39 40 |
# File 'lib/errplane/backtrace.rb', line 38 def inspect "<Backtrace: " + lines.collect { |line| line.to_s }.join(", ") + ">" end |
#to_a ⇒ Object
34 35 36 |
# File 'lib/errplane/backtrace.rb', line 34 def to_a lines.map(&:to_s) end |