Sha256: f5c3b7cf24bfc38eb8add96333eaeb184cc7d462b2cc7e37867bd2e60cd8ab1c
Contents?: true
Size: 611 Bytes
Versions: 47
Compression:
Stored size: 611 Bytes
Contents
class RequestLogAnalyzer::Database::Request < RequestLogAnalyzer::Database::Base # Returns an array of all the Line objects of this request in the correct order. def lines @lines ||= begin lines = [] self.class.reflections.each { |r, d| lines += self.send(r).all } lines.sort end end # Creates the table to store requests in. def self.create_table! unless database.connection.table_exists?(:requests) database.connection.create_table(:requests) do |t| t.column :first_lineno, :integer t.column :last_lineno, :integer end end end end
Version data entries
47 entries across 47 versions & 2 rubygems