module Webservice

default (built-in) response handler

Constants

CONTENT_LENGTH

HTTP headers

CONTENT_TYPE
DELETE
GET

use (an reuse from Rack) some freezed string constants

HTTP verbs
LAST_MODIFIED
LOCATION

– more HTTP headers - not available from Rack

OPTIONS
PATCH
POST
PUT
VERSION

Public Class Methods

banner() click to toggle source
load( code ) click to toggle source
# File lib/webservice.rb, line 38
def self.load( code )
  app_class = Class.new( Base )     ## create new app_class or just use Base itself - why? why not?
  app_class.class_eval( code )   ## note: use class_eval (NOT instance_eval)
  app_class
end
load_file( path ) click to toggle source
# File lib/webservice.rb, line 33
def self.load_file( path )
  code = File.open( path, 'r:bom|utf-8' ).read
  self.load( code )
end
root() click to toggle source
# File lib/webservice/version.rb, line 23
def self.root
  "#{File.expand_path( File.dirname(File.dirname(File.dirname(__FILE__))) )}"
end
version() click to toggle source
# File lib/webservice/version.rb, line 15
def self.version
  VERSION
end