Class: MerbFootnotes::Extensions::Sql
- Inherits:
-
Object
- Object
- MerbFootnotes::Extensions::Sql
- Defined in:
- lib/merb_footnotes/notes/queries_note.rb
Instance Attribute Summary collapse
-
#explain ⇒ Object
Returns the value of attribute explain.
-
#name ⇒ Object
Returns the value of attribute name.
-
#query ⇒ Object
Returns the value of attribute query.
-
#time ⇒ Object
Returns the value of attribute time.
-
#trace ⇒ Object
Returns the value of attribute trace.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type, name, time, query, explain) ⇒ Sql
constructor
A new instance of Sql.
Constructor Details
#initialize(type, name, time, query, explain) ⇒ Sql
Returns a new instance of Sql.
102 103 104 105 106 107 108 109 110 111 |
# File 'lib/merb_footnotes/notes/queries_note.rb', line 102 def initialize(type, name, time, query, explain) @type = type @name = name @time = time @query = query @explain = explain # Strip, select those ones from app and reject first two, because they are from the plugin @trace = Kernel.caller.collect{|c| c.strip}.select{|i| i.gsub!(/^#{Merb.root}\//im, '') }[2..-1] end |
Instance Attribute Details
#explain ⇒ Object
Returns the value of attribute explain.
100 101 102 |
# File 'lib/merb_footnotes/notes/queries_note.rb', line 100 def explain @explain end |
#name ⇒ Object
Returns the value of attribute name.
100 101 102 |
# File 'lib/merb_footnotes/notes/queries_note.rb', line 100 def name @name end |
#query ⇒ Object
Returns the value of attribute query.
100 101 102 |
# File 'lib/merb_footnotes/notes/queries_note.rb', line 100 def query @query end |
#time ⇒ Object
Returns the value of attribute time.
100 101 102 |
# File 'lib/merb_footnotes/notes/queries_note.rb', line 100 def time @time end |
#trace ⇒ Object
Returns the value of attribute trace.
100 101 102 |
# File 'lib/merb_footnotes/notes/queries_note.rb', line 100 def trace @trace end |
#type ⇒ Object
Returns the value of attribute type.
100 101 102 |
# File 'lib/merb_footnotes/notes/queries_note.rb', line 100 def type @type end |