Module: Skypager::Proxy::Errors

Defined in:
lib/skypager/proxy.rb

Class Method Summary collapse

Class Method Details

.forbiddenObject



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

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

.method_not_allowedObject



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

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

.not_found(reason = "not found man") ⇒ Object



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

def not_found(reason="not found man")
  [404, {'Content-Type' => 'text/plain'}, [reason.to_s]]
end

.not_modifiedObject



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

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

.precondition_failedObject



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

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

.unknown(code) ⇒ Object



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

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