Class: Angelo::Base::RouteMap
- Inherits:
-
Object
- Object
- Angelo::Base::RouteMap
- Defined in:
- lib/angelo/base.rb
Instance Method Summary collapse
- #[](route) ⇒ Object
- #[]=(route, responder) ⇒ Object
-
#initialize ⇒ RouteMap
constructor
A new instance of RouteMap.
Constructor Details
#initialize ⇒ RouteMap
Returns a new instance of RouteMap.
403 404 405 |
# File 'lib/angelo/base.rb', line 403 def initialize @hash = Hash.new end |
Instance Method Details
#[](route) ⇒ Object
411 412 413 414 415 |
# File 'lib/angelo/base.rb', line 411 def [] route mustermann, responder = @hash.find {|k,v| k.match(route)} responder.mustermann = mustermann if mustermann responder end |
#[]=(route, responder) ⇒ Object
407 408 409 |
# File 'lib/angelo/base.rb', line 407 def []= route, responder @hash[route] = responder end |