Class: Pepito::Handler

Inherits:
Object
  • Object
show all
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

Defined Under Namespace

Modules: ChatRouter, HTTPRouter

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ChatRouter

#chat_route, #chat_routes

Methods included from HTTPRouter

#http_route, #http_routes

Constructor Details

#initialize(robot) ⇒ void

Initializes the Adapter class

Parameters:



18
19
20
# File 'lib/pepito/handler.rb', line 18

def initialize(robot)
  @robot = robot
end

Instance Attribute Details

#robotPepito::Robot (readonly)

Currently running robot

Returns:



13
14
15
# File 'lib/pepito/handler.rb', line 13

def robot
  @robot
end

Instance Method Details

#startvoid

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