Class: Acrylic::ErrorRoute

Inherits:
Route show all
Defined in:
lib/cascade/errors.rb

Instance Attribute Summary collapse

Attributes inherited from Route

#paths, #verbs

Instance Method Summary collapse

Methods inherited from Route

#call, #path_match?

Constructor Details

#initialize(code, args, handler) ⇒ ErrorRoute

Returns a new instance of ErrorRoute.



14
15
16
17
# File 'lib/cascade/errors.rb', line 14

def initialize code, args, handler
    @code = code
    super args, handler
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



12
13
14
# File 'lib/cascade/errors.rb', line 12

def code
  @code
end

Instance Method Details

#match?(code, req) ⇒ Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/cascade/errors.rb', line 19

def match? code, req
    (@code == code) and super req
end