Class: LogBench::Log::CallLineEntry
- Defined in:
- lib/log_bench/log/call_line_entry.rb
Instance Attribute Summary
Attributes inherited from Entry
#content, #raw_line, #request_id, #timestamp, #timing, #type
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(raw_line) ⇒ CallLineEntry
constructor
A new instance of CallLineEntry.
- #to_h ⇒ Object
Methods inherited from Entry
#http_request?, parseable?, #related_log?
Constructor Details
#initialize(raw_line) ⇒ CallLineEntry
Returns a new instance of CallLineEntry.
6 7 8 9 |
# File 'lib/log_bench/log/call_line_entry.rb', line 6 def initialize(raw_line) super self.type = :sql_call_line end |
Class Method Details
.build(raw_line) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/log_bench/log/call_line_entry.rb', line 11 def self.build(raw_line) return unless parseable?(raw_line) entry = Entry.new(raw_line) return unless entry.type == :sql_call_line new(raw_line) end |
Instance Method Details
#to_h ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/log_bench/log/call_line_entry.rb', line 20 def to_h super.merge( content: content, file_path: file_path, line_number: line_number, method_name: method_name ) end |