Sha256: 3d39747bc6e8ec9ccd2aeb442fab4a77ef4f93e6e463eb3d18fafef797a23411

Contents?: true

Size: 232 Bytes

Versions: 6

Compression:

Stored size: 232 Bytes

Contents

$:.unshift( "../lib" )
require 'capcode'
require 'capcode/render/json'

module Capcode
  class Index < Route '/'
    def get
      render :json => { :hello => "Hello World", :values => [1, 2, 3] }
    end
  end  
end

Capcode.run( )

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
Capcode-0.8.9 examples/render-json.rb
Capcode-0.8.8 examples/render-json.rb
Capcode-0.8.7 examples/render-json.rb
Capcode-0.8.6 examples/render-json.rb
Capcode-0.8.5 examples/render-json.rb
Capcode-0.8.4 examples/render-json.rb