Class: GlTail::Source::Base
- Inherits:
-
Object
- Object
- GlTail::Source::Base
- Includes:
- Configurable
- Defined in:
- lib/gl_tail/sources/base.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#name ⇒ Object
Returns the value of attribute name.
-
#parser ⇒ Object
Returns the value of attribute parser.
Instance Method Summary collapse
- #add_activity(opts = {}) ⇒ Object
- #add_event(opts = {}) ⇒ Object
-
#initialize(config) ⇒ Base
constructor
A new instance of Base.
- #process ⇒ Object
- #update ⇒ Object
Methods included from Configurable
#config_rewrite_color, included
Constructor Details
#initialize(config) ⇒ Base
Returns a new instance of Base.
11 12 13 |
# File 'lib/gl_tail/sources/base.rb', line 11 def initialize(config) @config = config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
15 16 17 |
# File 'lib/gl_tail/sources/base.rb', line 15 def config @config end |
#name ⇒ Object
Returns the value of attribute name.
9 10 11 |
# File 'lib/gl_tail/sources/base.rb', line 9 def name @name end |
#parser ⇒ Object
Returns the value of attribute parser.
15 16 17 |
# File 'lib/gl_tail/sources/base.rb', line 15 def parser @parser end |
Instance Method Details
#add_activity(opts = {}) ⇒ Object
35 36 37 |
# File 'lib/gl_tail/sources/base.rb', line 35 def add_activity( opts = {} ) @config.add_activity( self, opts ) end |
#add_event(opts = {}) ⇒ Object
39 40 41 |
# File 'lib/gl_tail/sources/base.rb', line 39 def add_event( opts = {} ) @config.add_event( self, opts ) end |
#process ⇒ Object
27 28 29 |
# File 'lib/gl_tail/sources/base.rb', line 27 def process raise "#{self.class.to_s} does not implement .process" end |
#update ⇒ Object
31 32 33 |
# File 'lib/gl_tail/sources/base.rb', line 31 def update raise "#{self.class.to_s} does not implement .update" end |