Class: TextTractor::Base

Inherits:
Sinatra::Application
  • Object
show all
Defined in:
lib/text_tractor/base.rb

Direct Known Subclasses

ApiServer, UiServer

Instance Method Summary collapse

Constructor Details

#initialize(app = nil) ⇒ Base

Returns a new instance of Base.



13
14
15
# File 'lib/text_tractor/base.rb', line 13

def initialize(app=nil)
  super
end

Instance Method Details

#not_authorisedObject



21
22
23
# File 'lib/text_tractor/base.rb', line 21

def not_authorised
  [ 403, "Not Authorised" ]
end

#redisObject



17
18
19
# File 'lib/text_tractor/base.rb', line 17

def redis
  TextTractor.redis
end