Class: LastResort::Application

Inherits:
Sinatra::Base
  • Object
show all
Defined in:
lib/last-resort/application.rb

Overview

The main Sinatra application. Defines the API interface and webhooks called by Twilio and ContextIO for call handling logic and email matching, respectively.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeApplication

Returns a new instance of Application.



8
9
10
# File 'lib/last-resort/application.rb', line 8

def initialize
  super
end

Class Method Details

.exception_sessionObject

The exception session keeps state between twilio and context-io webhooks. Currently, the system can only handle one call session at a time, although we plan to change that in future versions.



15
16
17
# File 'lib/last-resort/application.rb', line 15

def self.exception_session
  @exception_session
end

.exception_session=(session) ⇒ Object



19
20
21
# File 'lib/last-resort/application.rb', line 19

def self.exception_session=(session)
  @exception_session = session
end