Class: Xenon::Routing::Rejection

Inherits:
Object
  • Object
show all
Defined in:
lib/xenon/routing/context.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reason, info = {}) ⇒ Rejection

Returns a new instance of Rejection.



6
7
8
9
# File 'lib/xenon/routing/context.rb', line 6

def initialize(reason, info = {})
  @reason = reason
  @info = info
end

Instance Attribute Details

#infoObject (readonly)

Returns the value of attribute info.



4
5
6
# File 'lib/xenon/routing/context.rb', line 4

def info
  @info
end

#reasonObject (readonly)

Returns the value of attribute reason.



4
5
6
# File 'lib/xenon/routing/context.rb', line 4

def reason
  @reason
end

Instance Method Details

#[](name) ⇒ Object



11
12
13
# File 'lib/xenon/routing/context.rb', line 11

def [](name)
  @info[name]
end