Class: Rack::DevInsight::Result::Sql::ErroredQueries

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/dev_insight/result/sql/errored_queries.rb

Defined Under Namespace

Classes: ErroredQuery

Instance Method Summary collapse

Constructor Details

#initializeErroredQueries

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, message, statement, backtrace, duration)
  @data << ErroredQuery.new(id, message, statement, backtrace, duration)
end

#attributesObject



18
19
20
# File 'lib/rack/dev_insight/result/sql/errored_queries.rb', line 18

def attributes
  @data.map(&:to_h)
end