StackDeck::Frame::SQL

Public Class Methods

from_char(query, position) click to toggle source
# File lib/stackdeck/frame.rb, line 104
def self.from_char(query, position)
  before = query[0, position.to_i]
  lineno = 1 + before.size - before.gsub(/\n/, '').size
  self.new(query, lineno)
end
new(query, lineno=nil, clue=nil) click to toggle source
# File lib/stackdeck/frame.rb, line 110
def initialize(query, lineno=nil, clue=nil)
  @query = query
  super(nil, nil, lineno, clue)
end

Public Instance Methods

context() click to toggle source
# File lib/stackdeck/frame.rb, line 114
def context
  @context ||= Context.new(@query.split(/\n/), lineno) if @query
end
context?() click to toggle source
# File lib/stackdeck/frame.rb, line 117
def context?
  !@query.nil?
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.