Module: Skypager::Proxy::Errors
- Defined in:
- lib/skypager/proxy.rb
Class Method Summary collapse
- .forbidden ⇒ Object
- .method_not_allowed ⇒ Object
- .not_found(reason = "not found man") ⇒ Object
- .not_modified ⇒ Object
- .precondition_failed ⇒ Object
- .unknown(code) ⇒ Object
Class Method Details
.forbidden ⇒ Object
156 157 158 |
# File 'lib/skypager/proxy.rb', line 156 def forbidden [403, {'Content-Type' => 'text/plain'}, ["forbidden"]] end |
.method_not_allowed ⇒ Object
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_modified ⇒ Object
164 165 166 |
# File 'lib/skypager/proxy.rb', line 164 def not_modified [304, {}, [""]] end |
.precondition_failed ⇒ Object
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 |