module BivouacSample::Controllers class Observe < R '/observe' WORDLIST = %w{Bivouac is a full stack, open-source web framework in Ruby for writing real world applications with joy and less code than most frameworks spend doing XML sit-ups } def get render :observe end def post @search = input.request matcher = Regexp.new( @search ) @results = WORDLIST.find_all{ |w| w =~ matcher } render :_observe_result end end end