Sha256: 6699a93ff8fe465b99e5c940062d9b1a8a0796ed3b523661952034464c15c27a
Contents?: true
Size: 501 Bytes
Versions: 8
Compression:
Stored size: 501 Bytes
Contents
require 'lunetas' class Testing include Lunetas::Candy matches '/hello/(\w+)', :name def before @name = @name.capitalize end def get "Hello #{@name}! #{params[:chunky]}" end def post "Hey #{@name}, I see you're testing the POST method :)" end end class AnotherTest include Lunetas::Candy matches '^/(\d+)$', :number def get "Is #{@number} your lucky number?" end def other_verb(verb) if verb == 'TEAPOT' "I ain't a teapot!" end end end
Version data entries
8 entries across 8 versions & 1 rubygems