Class: StackDeck::Frame::SQL
- Inherits:
-
StackDeck::Frame
- Object
- StackDeck::Frame
- StackDeck::Frame::SQL
- Defined in:
- lib/stackdeck/frame.rb
Instance Attribute Summary
Attributes inherited from StackDeck::Frame
#clue, #filename, #function, #lineno
Class Method Summary collapse
Instance Method Summary collapse
- #context ⇒ Object
- #context? ⇒ Boolean
-
#initialize(query, lineno = nil, clue = nil) ⇒ SQL
constructor
A new instance of SQL.
Methods inherited from StackDeck::Frame
#boundary?, #language, #same_line?, #to_s
Constructor Details
#initialize(query, lineno = nil, clue = nil) ⇒ SQL
Returns a new instance of SQL.
110 111 112 113 |
# File 'lib/stackdeck/frame.rb', line 110 def initialize(query, lineno=nil, clue=nil) @query = query super(nil, nil, lineno, clue) end |
Class Method Details
.from_char(query, position) ⇒ Object
104 105 106 107 108 |
# 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 |