Class: LogfileInterval::ParsedLine::Base
- Inherits:
-
Object
- Object
- LogfileInterval::ParsedLine::Base
show all
- Extended by:
- Parser
- Defined in:
- lib/logfile_interval/parsed_line/base.rb
Instance Attribute Summary collapse
Attributes included from Parser
#regex
Instance Method Summary
collapse
Methods included from Parser
add_column, columns, create_record, each, parse, set_column_custom_options, set_regex, skip, skip_columns, skip_columns_with_exceptions, skip_with_exceptions
Constructor Details
#initialize(line) ⇒ Base
Returns a new instance of Base.
10
11
12
13
14
15
|
# File 'lib/logfile_interval/parsed_line/base.rb', line 10
def initialize(line)
@data = self.class.parse(line)
@valid = @data ? true : false
@skip = @data ? @data[:skip] : false
@skip_with_exceptions = @data ? @data[:skip_with_exceptions] : false
end
|
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
6
7
8
|
# File 'lib/logfile_interval/parsed_line/base.rb', line 6
def data
@data
end
|
Instance Method Details
#[](name) ⇒ Object
33
34
35
|
# File 'lib/logfile_interval/parsed_line/base.rb', line 33
def [](name)
@data[name]
end
|
#skip? ⇒ Boolean
21
22
23
|
# File 'lib/logfile_interval/parsed_line/base.rb', line 21
def skip?
@skip
end
|
#skip_with_exceptions? ⇒ Boolean
25
26
27
|
# File 'lib/logfile_interval/parsed_line/base.rb', line 25
def skip_with_exceptions?
@skip_with_exceptions
end
|
#time ⇒ Object
29
30
31
|
# File 'lib/logfile_interval/parsed_line/base.rb', line 29
def time
raise NotImplemented
end
|
#valid? ⇒ Boolean
17
18
19
|
# File 'lib/logfile_interval/parsed_line/base.rb', line 17
def valid?
@valid
end
|