Class: Apia::DSLs::Error
Instance Method Summary
collapse
#field
Methods inherited from Apia::DSL
#description, #initialize, #name, #no_schema
Constructor Details
This class inherits a constructor from Apia::DSL
Instance Method Details
#catch_exception(klass, &block) ⇒ Object
20
21
22
|
# File 'lib/apia/dsls/error.rb', line 20
def catch_exception(klass, &block)
@definition.catchable_exceptions[klass] = block
end
|
#code(code) ⇒ Object
12
13
14
|
# File 'lib/apia/dsls/error.rb', line 12
def code(code)
@definition.code = code
end
|
#http_status(http_status) ⇒ Object
16
17
18
|
# File 'lib/apia/dsls/error.rb', line 16
def http_status(http_status)
@definition.http_status = http_status
end
|