lib/request_log_analyzer/source.rb in wvanbergen-request-log-analyzer-1.3.5 vs lib/request_log_analyzer/source.rb in wvanbergen-request-log-analyzer-1.3.6
- old
+ new
@@ -19,13 +19,10 @@
#
# A source implememtation should at least implement the each_request method, which should yield
# RequestLogAnalyzer::Request instances that will be fed through the pipleine.
class Base
- # Make the Spurce instance aware of the current file format
- include RequestLogAnalyzer::FileFormat::Awareness
-
# A hash of options
attr_reader :options
# The current Request object that is being parsed
attr_reader :current_request
@@ -40,17 +37,18 @@
attr_reader :parsed_requests
# The total number of skipped requests because of filters.
attr_reader :skipped_requests
+ # The FileFormat instance that describes the format of this source.
+ attr_reader :file_format
-
# Initializer, which will register the file format and save any options given as a hash.
# <tt>format</tt>:: The file format instance
# <tt>options</tt>:: A hash of options that can be used by a specific Source implementation
def initialize(format, options = {})
- @options = options
- register_file_format(format)
+ @options = options
+ @file_format = format
end
# The prepare method is called before the RequestLogAnalyzer::Source::Base#each_request method is called.
# Use this method to implement any initialization that should occur before this source can produce Request
# instances.
\ No newline at end of file