Module: Angelo::Mustermann::ClassMethods

Defined in:
lib/angelo/mustermann.rb

Instance Method Summary collapse

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



45
46
47
48
49
# File 'lib/angelo/mustermann.rb', line 45

def filter_by which, path, meth
  pattern = ::Mustermann.new path
  filters[which][pattern] ||= []
  filters[which][pattern] << meth
end

#routesObject



41
42
43
# File 'lib/angelo/mustermann.rb', line 41

def routes
  @routes ||= Hash.new{|h,k| h[k] = RouteMap.new}
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