Class: Logripper::Parser
- Inherits:
-
Object
- Object
- Logripper::Parser
- Defined in:
- lib/logripper/parser.rb
Instance Attribute Summary collapse
-
#log_file ⇒ Object
readonly
Returns the value of attribute log_file.
Instance Method Summary collapse
- #find(url) ⇒ Object
-
#initialize(log_file) ⇒ Parser
constructor
A new instance of Parser.
Constructor Details
#initialize(log_file) ⇒ Parser
Returns a new instance of Parser.
5 6 7 |
# File 'lib/logripper/parser.rb', line 5 def initialize(log_file) @log_file = log_file end |
Instance Attribute Details
#log_file ⇒ Object (readonly)
Returns the value of attribute log_file.
3 4 5 |
# File 'lib/logripper/parser.rb', line 3 def log_file @log_file end |
Instance Method Details
#find(url) ⇒ Object
9 10 11 12 13 |
# File 'lib/logripper/parser.rb', line 9 def find(url) parsed_lines.find_all do |line| line[:url] == url end.force end |