StackDeck

Public Class Methods

apply_boundary!(deck) click to toggle source
# File lib/stackdeck/frame.rb, line 15
def self.apply_boundary!(deck)
  deck.each_with_index do |s, idx|
    # We don't want any more frames if this is a boundary marker,
    # *and* the exception didn't occur really close to said boundary.
    if s.boundary? && idx > 2
      deck.slice! idx, -1
      break
    end
  end
end
boundary() click to toggle source
# File lib/stackdeck/frame.rb, line 3
def self.boundary; yield; end
split_list(full_list, short_list) click to toggle source
# File lib/stackdeck/frame.rb, line 5
def self.split_list(full_list, short_list)
  short_list = short_list.dup
  upper = full_list.dup
  lower = []
  while !short_list.empty? && upper.last == short_list.pop
    lower << upper.pop
  end
  [upper, lower.reverse]
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.