Exception: ApiValve::Error
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- ApiValve::Error
- Defined in:
- lib/api_valve/error.rb
Constant Summary collapse
- Client =
Class.new(self)
- Server =
Class.new(self)
- NotRouted =
Class.new(self) do self.http_status = 404 end
Instance Method Summary collapse
- #code ⇒ Object
-
#initialize(*args) ⇒ Error
constructor
A new instance of Error.
- #title ⇒ Object
Constructor Details
#initialize(*args) ⇒ Error
Returns a new instance of Error.
22 23 24 25 |
# File 'lib/api_valve/error.rb', line 22 def initialize(*args) @options = args. super(args.first || ) end |
Instance Method Details
#code ⇒ Object
27 28 29 |
# File 'lib/api_valve/error.rb', line 27 def code @options[:code] || self.class.code end |
#title ⇒ Object
31 32 33 |
# File 'lib/api_valve/error.rb', line 31 def title @options[:title] || self.class.title end |