Class: Pepito::Handler
- Inherits:
-
Object
- Object
- Pepito::Handler
- Includes:
- ChatRouter, HTTPRouter
- Defined in:
- lib/pepito/handler.rb,
lib/pepito/handler/chat_router.rb,
lib/pepito/handler/http_router.rb
Overview
Parent class for any handler Handlers implement the logic for chat and http routes for the robot
Direct Known Subclasses
Pepito::Handlers::ExtensionsCatalog, Pepito::Handlers::Help, Pepito::Handlers::Info, Pepito::Handlers::Room
Defined Under Namespace
Modules: ChatRouter, HTTPRouter
Instance Attribute Summary collapse
-
#robot ⇒ Pepito::Robot
readonly
Currently running robot.
Instance Method Summary collapse
-
#initialize(robot) ⇒ void
constructor
Initializes the Adapter class.
-
#start ⇒ void
Starts the handler.
Methods included from ChatRouter
Methods included from HTTPRouter
Constructor Details
#initialize(robot) ⇒ void
Initializes the Adapter class
18 19 20 |
# File 'lib/pepito/handler.rb', line 18 def initialize(robot) @robot = robot end |
Instance Attribute Details
#robot ⇒ Pepito::Robot (readonly)
Currently running robot
13 14 15 |
# File 'lib/pepito/handler.rb', line 13 def robot @robot end |
Instance Method Details
#start ⇒ void
This method returns an undefined value.
Starts the handler
24 25 26 |
# File 'lib/pepito/handler.rb', line 24 def start register_http_routes end |