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

Version Path
request-log-analyzer-1.13.1 lib/request_log_analyzer/database/request.rb
request-log-analyzer-1.13.0 lib/request_log_analyzer/database/request.rb
request-log-analyzer-1.12.11 lib/request_log_analyzer/database/request.rb
request-log-analyzer-1.12.10 lib/request_log_analyzer/database/request.rb
request-log-analyzer-1.12.9 lib/request_log_analyzer/database/request.rb
request-log-analyzer-1.12.8 lib/request_log_analyzer/database/request.rb
request-log-analyzer-1.12.7 lib/request_log_analyzer/database/request.rb
request-log-analyzer-1.12.6 lib/request_log_analyzer/database/request.rb
request-log-analyzer-1.12.5 lib/request_log_analyzer/database/request.rb
request-log-analyzer-1.12.4 lib/request_log_analyzer/database/request.rb
request-log-analyzer-1.12.3 lib/request_log_analyzer/database/request.rb
request-log-analyzer-1.12.2 lib/request_log_analyzer/database/request.rb
request-log-analyzer-1.12.1 lib/request_log_analyzer/database/request.rb
request-log-analyzer-1.12.0 lib/request_log_analyzer/database/request.rb
request-log-analyzer-1.11.1 lib/request_log_analyzer/database/request.rb
request-log-analyzer-1.11.0 lib/request_log_analyzer/database/request.rb
request-log-analyzer-1.10.1 lib/request_log_analyzer/database/request.rb
request-log-analyzer-1.10.0 lib/request_log_analyzer/database/request.rb
request-log-analyzer-1.9.10 lib/request_log_analyzer/database/request.rb
request-log-analyzer-1.9.9 lib/request_log_analyzer/database/request.rb