Class: Kibosh

Inherits:
Object
  • Object
show all
Includes:
Exceptions
Defined in:
lib/kibosh.rb,
lib/kibosh/xmpp.rb,
lib/kibosh/router.rb,
lib/kibosh/request.rb,
lib/kibosh/session.rb,
lib/kibosh/sinatra.rb,
lib/kibosh/response.rb,
lib/kibosh/sessions.rb,
lib/kibosh/exceptions.rb,
lib/kibosh/xmpp/client/connection.rb

Defined Under Namespace

Modules: Exceptions, XMPP Classes: Request, Response, Router, Session, Sessions

Constant Summary collapse

VERSION =
'0.1.0'

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Kibosh

Returns a new instance of Kibosh.



11
12
13
# File 'lib/kibosh.rb', line 11

def initialize options = {}
  @router = Router.new options[:hosts]
end

Instance Method Details

#call(env) ⇒ Object



15
16
17
18
# File 'lib/kibosh.rb', line 15

def call(env)
  @sessions ||= Sessions.new(env)
  Request.handle(env,@sessions,@router)
end