Class: GlTail::Source::Base

Inherits:
Object
  • Object
show all
Includes:
Configurable
Defined in:
lib/gl_tail/sources/base.rb

Direct Known Subclasses

Local, SSH

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#configObject (readonly)

Returns the value of attribute config.



15
16
17
# File 'lib/gl_tail/sources/base.rb', line 15

def config
  @config
end

#nameObject

Returns the value of attribute name.



9
10
11
# File 'lib/gl_tail/sources/base.rb', line 9

def name
  @name
end

#parserObject

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

#processObject



27
28
29
# File 'lib/gl_tail/sources/base.rb', line 27

def process
  raise "#{self.class.to_s} does not implement .process"
end

#updateObject



31
32
33
# File 'lib/gl_tail/sources/base.rb', line 31

def update
  raise "#{self.class.to_s} does not implement .update"
end