Class: ApacheCrunch::Entry
- Inherits:
-
Object
- Object
- ApacheCrunch::Entry
- Defined in:
- lib/entry.rb
Overview
A parsed entry from the log.
Acts like a hash, in that you get at the log elements (e.g. “url_path”, “remote_host”) by as entry.
Instance Attribute Summary collapse
-
#captured_elements ⇒ Object
Returns the value of attribute captured_elements.
Instance Method Summary collapse
- #dep_inject!(element_value_fetcher_cls) ⇒ Object
- #fetch(name) ⇒ Object
-
#initialize ⇒ Entry
constructor
A new instance of Entry.
Constructor Details
#initialize ⇒ Entry
Returns a new instance of Entry.
12 13 14 15 16 17 |
# File 'lib/entry.rb', line 12 def initialize @captured_elements = {} @_value_fetcher = nil @_ElementValueFetcher = ElementValueFetcher end |
Instance Attribute Details
#captured_elements ⇒ Object
Returns the value of attribute captured_elements.
10 11 12 |
# File 'lib/entry.rb', line 10 def captured_elements @captured_elements end |
Instance Method Details
#dep_inject!(element_value_fetcher_cls) ⇒ Object
19 20 21 |
# File 'lib/entry.rb', line 19 def dep_inject!(element_value_fetcher_cls) @_ElementValueFetcher = element_value-fetcher_cls end |
#fetch(name) ⇒ Object
23 24 25 26 |
# File 'lib/entry.rb', line 23 def fetch(name) @_value_fetcher = @_ElementValueFetcher.new if @_value_fetcher.nil? @_value_fetcher.fetch(self, name) end |