Parent

StackDeck::Frame

Attributes

clue[RW]
filename[RW]
function[RW]
lineno[RW]

Public Class Methods

new(function, filename, lineno, clue=nil) click to toggle source
# File lib/stackdeck/frame.rb, line 28
def initialize(function, filename, lineno, clue=nil)
  @function = function
  @filename = filename unless filename && filename.empty?
  @lineno = lineno
  @clue = clue unless clue && clue.empty?
end

Public Instance Methods

boundary?() click to toggle source
# File lib/stackdeck/frame.rb, line 44
def boundary?; false; end
context() click to toggle source
# File lib/stackdeck/frame.rb, line 34
def context
  @context ||= Context::File.new(filename, lineno) if filename
end
context?() click to toggle source
# File lib/stackdeck/frame.rb, line 37
def context?
  !filename.nil?
end
language() click to toggle source
# File lib/stackdeck/frame.rb, line 43
def language; self.class.name.split('::').last; end
same_line?(other) click to toggle source
# File lib/stackdeck/frame.rb, line 40
def same_line?(other)
  other && self.filename == other.filename && self.lineno == other.lineno
end
to_s() click to toggle source
# File lib/stackdeck/frame.rb, line 46
def to_s
  if filename
    if function && function != ''
      "#{filename}:#{lineno}:in `#{function}' [#{language}]"
    else
      "#{filename}:#{lineno} [#{language}]"
    end
  else
    if function && function != ''
      "(#{language}):#{lineno}:in `#{function}'"
    else
      "(#{language}):#{lineno}"
    end
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.