Class: StackDeck::Frame::Postgres::Function
- Inherits:
-
StackDeck::Frame
- Object
- StackDeck::Frame
- StackDeck::Frame::Postgres::Function
- Defined in:
- lib/stackdeck/postgres.rb
Instance Attribute Summary
Attributes inherited from StackDeck::Frame
#clue, #filename, #function, #lineno
Instance Method Summary collapse
- #context ⇒ Object
- #context? ⇒ Boolean
-
#initialize(conn, language, function, lineno, clue = nil) ⇒ Function
constructor
A new instance of Function.
- #language ⇒ Object
Methods inherited from StackDeck::Frame
#boundary?, #same_line?, #to_s
Constructor Details
#initialize(conn, language, function, lineno, clue = nil) ⇒ Function
Returns a new instance of Function.
28 29 30 31 32 |
# File 'lib/stackdeck/postgres.rb', line 28 def initialize(conn, language, function, lineno, clue=nil) @db_connection = conn @language = language super(function, nil, lineno, clue) end |
Instance Method Details
#context ⇒ Object
33 34 35 |
# File 'lib/stackdeck/postgres.rb', line 33 def context @context ||= Context::PgProc.new(@db_connection, function, lineno) if @db_connection end |
#context? ⇒ Boolean
36 37 38 |
# File 'lib/stackdeck/postgres.rb', line 36 def context? !context.nil? end |
#language ⇒ Object
39 40 41 |
# File 'lib/stackdeck/postgres.rb', line 39 def language @language.gsub(/ function$/, '') end |