Class: RequestLogAnalyzer::LineDefinition::CaptureDefiner
- Inherits:
-
Object
- Object
- RequestLogAnalyzer::LineDefinition::CaptureDefiner
- Defined in:
- lib/request_log_analyzer/line_definition.rb
Instance Attribute Summary collapse
-
#capture_hash ⇒ Object
Returns the value of attribute capture_hash.
Instance Method Summary collapse
- #as(type, type_options = {}) ⇒ Object
-
#initialize(hash) ⇒ CaptureDefiner
constructor
A new instance of CaptureDefiner.
Constructor Details
#initialize(hash) ⇒ CaptureDefiner
Returns a new instance of CaptureDefiner.
33 34 35 |
# File 'lib/request_log_analyzer/line_definition.rb', line 33 def initialize(hash) @capture_hash = hash end |
Instance Attribute Details
#capture_hash ⇒ Object
Returns the value of attribute capture_hash.
31 32 33 |
# File 'lib/request_log_analyzer/line_definition.rb', line 31 def capture_hash @capture_hash end |
Instance Method Details
#as(type, type_options = {}) ⇒ Object
37 38 39 40 |
# File 'lib/request_log_analyzer/line_definition.rb', line 37 def as(type, = {}) @capture_hash.merge!(.merge(type: type)) self end |