Class: Log::Analyzer::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/log-analyzer/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



5
6
7
8
# File 'lib/log-analyzer/config.rb', line 5

def initialize
  @route_regexp = /(GET|POST|DELETE|PATCH|PUT)\s+([^\s]*)\s/i
  @log_regexp = /Started (?<request_method>GET|POST|DELETE|PATCH|PUT) "(?<path_info>[^"]+)"/i
end

Instance Attribute Details

#log_regexpObject

Returns the value of attribute log_regexp.



3
4
5
# File 'lib/log-analyzer/config.rb', line 3

def log_regexp
  @log_regexp
end

#route_regexpObject

Returns the value of attribute route_regexp.



3
4
5
# File 'lib/log-analyzer/config.rb', line 3

def route_regexp
  @route_regexp
end