Class: Wms::Input::Base

Inherits:
Plugin::Plugin show all
Includes:
Config::Mixin
Defined in:
lib/wms/input/base.rb

Direct Known Subclasses

AndroidSensor, AndroidWifiLocation, Filetype1

Instance Attribute Summary collapse

Attributes included from Config::Mixin

#config

Attributes inherited from Plugin::Plugin

#logger, #params, #state

Instance Method Summary collapse

Methods included from Config::Mixin

#get_config, included, #init_config, #set_config, #source

Methods inherited from Plugin::Plugin

#finished, #shutdown

Constructor Details

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.



10
11
12
13
14
15
16
17
# File 'lib/wms/input/base.rb', line 10

def initialize(options={})
  super
  @threadable = false
  @tags ||= []

  @logger = Logger.new(STDOUT)

end

Instance Attribute Details

#tagsObject

Returns the value of attribute tags.



7
8
9
# File 'lib/wms/input/base.rb', line 7

def tags
  @tags
end

Instance Method Details

#register(options = {}) ⇒ Object



26
27
28
# File 'lib/wms/input/base.rb', line 26

def register(options={})
  raise "#{self.class}#register must be overidden"
end

#run(&block) ⇒ Object



36
37
38
# File 'lib/wms/input/base.rb', line 36

def run(&block)
  raise "#{self.class}#run must be overidden"
end

#tag(newtag) ⇒ Object



42
43
44
# File 'lib/wms/input/base.rb', line 42

def tag(newtag)
  @tags << newtag
end