Class: Wms::Widget::Base

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

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



12
13
14
15
16
17
18
19
# File 'lib/wms/widget/base.rb', line 12

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

  @logger = Logger.new(STDOUT)

end

Instance Attribute Details

#tagsObject

Returns the value of attribute tags.



8
9
10
# File 'lib/wms/widget/base.rb', line 8

def tags
  @tags
end

Instance Method Details

#register(options = {}) ⇒ Object



28
29
30
# File 'lib/wms/widget/base.rb', line 28

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

#runObject



38
39
40
# File 'lib/wms/widget/base.rb', line 38

def run
  raise "#{self.class}#run must be overidden"
end

#tag(newtag) ⇒ Object



44
45
46
# File 'lib/wms/widget/base.rb', line 44

def tag(newtag)
  @tags << newtag
end