Class: Log::Analyzer::Pattern

Inherits:
ActionDispatch::Journey::Path::Pattern
  • Object
show all
Defined in:
lib/log-analyzer/pattern.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(strexp, request_method, uri_pattern) ⇒ Pattern

Returns a new instance of Pattern.



9
10
11
12
13
# File 'lib/log-analyzer/pattern.rb', line 9

def initialize(strexp, request_method, uri_pattern)
  @request_method = request_method
  @uri_pattern = uri_pattern
  super(strexp)
end

Instance Attribute Details

#request_method ⇒ Object

Returns the value of attribute request_method.



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

def request_method
  @request_method
end

#uri_pattern ⇒ Object

Returns the value of attribute uri_pattern.



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

def uri_pattern
  @uri_pattern
end

Class Method Details

.from_string(request_method, uri_pattern) ⇒ Object



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

def self.from_string(request_method, uri_pattern)
  new(ActionDispatch::Journey::Router::Strexp.build(uri_pattern, {}, ["/.?"], true), request_method, uri_pattern)
end