Class: Angelo::Base::RouteMap

Inherits:
Object
  • Object
show all
Defined in:
lib/angelo/base.rb

Instance Method Summary collapse

Constructor Details

#initializeRouteMap

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