Module: Skypager::Proxy::Errors

Defined in:
lib/skypager/proxy.rb

Class Method Summary collapse

Class Method Details

.forbiddenObject



157
158
159
# File 'lib/skypager/proxy.rb', line 157

def forbidden
  [403, {'Content-Type' => 'text/plain'}, ["forbidden"]]
end

.method_not_allowedObject



149
150
151
# File 'lib/skypager/proxy.rb', line 149

def method_not_allowed
  [405, {'Content-Type' => 'text/plain'}, ["method not allowed"]]
end

.not_foundObject



153
154
155
# File 'lib/skypager/proxy.rb', line 153

def not_found
  [404, {'Content-Type' => 'text/plain'}, ["not found"]]
end

.not_modifiedObject



165
166
167
# File 'lib/skypager/proxy.rb', line 165

def not_modified
  [304, {}, [""]]
end

.precondition_failedObject



161
162
163
# File 'lib/skypager/proxy.rb', line 161

def precondition_failed
  [412, {'Content-Type' => 'text/plain'}, ["precondition failed"]]
end

.unknown(code) ⇒ Object



169
170
171
# File 'lib/skypager/proxy.rb', line 169

def unknown(code)
  [code, {'Content-Type' => 'text/plain'}, ["Error: #{code}"]]
end