Sha256: 6772cfe9cec0fbdf8a04a8212503e6e8897a4d0989f70f91a2eade42c7ccdca5

Contents?: true

Size: 247 Bytes

Versions: 2

Compression:

Stored size: 247 Bytes

Contents

$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
require 'helmet'

class Helper < Helmet::API
  
  helpers do
    def xs(num)
      'x' * num
    end
  end
  
  get '/' do
    num = (params['x'] || 0).to_i
    xs(num)
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
helmet-0.2.1 examples/helper.rb
helmet-0.2.0 examples/helper.rb