Module: Angelo::Mustermann::ClassMethods
- Defined in:
- lib/angelo/mustermann.rb
Instance Method Summary collapse
- #eventsource(path, headers = nil, &block) ⇒ Object
- #filter_by(which, path, meth) ⇒ Object
- #routes ⇒ Object
- #websocket(path, &block) ⇒ Object
Instance Method Details
#eventsource(path, headers = nil, &block) ⇒ Object
36 37 38 39 |
# File 'lib/angelo/mustermann.rb', line 36 def eventsource path, headers = nil, &block path = ::Mustermann.new path super path, headers, &block end |
#filter_by(which, path, meth) ⇒ Object
49 50 51 52 53 |
# File 'lib/angelo/mustermann.rb', line 49 def filter_by which, path, meth pattern = ::Mustermann.new path filters[which][pattern] ||= [] filters[which][pattern] << meth end |
#routes ⇒ Object
41 42 43 44 45 46 47 |
# File 'lib/angelo/mustermann.rb', line 41 def routes @routes ||= {} ROUTABLE.each do |m| @routes[m] ||= RouteMap.new end @routes end |
#websocket(path, &block) ⇒ Object
31 32 33 34 |
# File 'lib/angelo/mustermann.rb', line 31 def websocket path, &block path = ::Mustermann.new path super path, &block end |