Class: Rack::DevInsight::Result::Sql::ErroredQueries
- Inherits:
-
Object
- Object
- Rack::DevInsight::Result::Sql::ErroredQueries
- Defined in:
- lib/rack/dev_insight/result/sql/errored_queries.rb
Defined Under Namespace
Classes: ErroredQuery
Instance Method Summary collapse
- #add(id, message, statement, backtrace, duration) ⇒ Object
- #attributes ⇒ Object
-
#initialize ⇒ ErroredQueries
constructor
A new instance of ErroredQueries.
Constructor Details
#initialize ⇒ ErroredQueries
Returns a new instance of ErroredQueries.
10 11 12 |
# File 'lib/rack/dev_insight/result/sql/errored_queries.rb', line 10 def initialize @data = [] end |
Instance Method Details
#add(id, message, statement, backtrace, duration) ⇒ Object
14 15 16 |
# File 'lib/rack/dev_insight/result/sql/errored_queries.rb', line 14 def add(id, , statement, backtrace, duration) @data << ErroredQuery.new(id, , statement, backtrace, duration) end |
#attributes ⇒ Object
18 19 20 |
# File 'lib/rack/dev_insight/result/sql/errored_queries.rb', line 18 def attributes @data.map(&:to_h) end |