Class: RequestLogAnalyzer::LineDefinition::CaptureDefiner

Inherits:
Object
  • Object
show all
Defined in:
lib/request_log_analyzer/line_definition.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_hashObject

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, type_options = {})
  @capture_hash.merge!(type_options.merge(type: type))
  self
end