Class: Ellen::Handlers::Base
- Inherits:
-
Object
- Object
- Ellen::Handlers::Base
- Extended by:
- Mem
- Includes:
- Env::Validatable
- Defined in:
- lib/ellen/handlers/base.rb
Instance Attribute Summary collapse
-
#robot ⇒ Object
readonly
Returns the value of attribute robot.
Class Method Summary collapse
Instance Method Summary collapse
- #call(message) ⇒ Object
-
#initialize(robot) ⇒ Base
constructor
A new instance of Base.
Methods included from Env::Validatable
Constructor Details
#initialize(robot) ⇒ Base
Returns a new instance of Base.
25 26 27 28 |
# File 'lib/ellen/handlers/base.rb', line 25 def initialize(robot) @robot = robot validate! end |
Instance Attribute Details
#robot ⇒ Object (readonly)
Returns the value of attribute robot.
23 24 25 |
# File 'lib/ellen/handlers/base.rb', line 23 def robot @robot end |
Class Method Details
.actions ⇒ Object
15 16 17 |
# File 'lib/ellen/handlers/base.rb', line 15 def actions [] end |
Instance Method Details
#call(message) ⇒ Object
30 31 32 33 34 |
# File 'lib/ellen/handlers/base.rb', line 30 def call() self.class.actions.each do |action| action.call(self, ) end end |