Class: LanGrove::Plugin::Base

Inherits:
Base
  • Object
show all
Defined in:
lib/langrove/plugin/plugin_base.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#logger

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#config_exception, #type

Constructor Details

#initialize(root, config, name = nil) ⇒ Base

Returns a new instance of Base.



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/langrove/plugin/plugin_base.rb', line 31

def initialize( root, config, name = nil )
  
  super( root )
  
  @logger.info "#{self.class}.initialize()"
  
  @pending = true
  
  @config = config

  @provides = {

    :enactor => {

      :version => 0

    }

  }
  
end

Instance Attribute Details

#providesObject (readonly)

Returns the value of attribute provides.



29
30
31
# File 'lib/langrove/plugin/plugin_base.rb', line 29

def provides
  @provides
end

Class Method Details

.typeObject



23
24
25
26
27
# File 'lib/langrove/plugin/plugin_base.rb', line 23

def self.type
  
  :base
  
end

Instance Method Details

#act(handler) ⇒ Object



63
64
65
66
67
68
69
70
71
72
73
# File 'lib/langrove/plugin/plugin_base.rb', line 63

def act( handler )
  
  #
  # for test only
  #
  
  @logger.debug( "#{self}.act( #{handler} )")
  
  return true
  
end

#behaviour_exception(error) ⇒ Object



53
54
55
56
57
58
59
60
61
# File 'lib/langrove/plugin/plugin_base.rb', line 53

def behaviour_exception( error )
  
  raise LanGrove::BehaviourException.new(
  
    error
  
  )
  
end