Sha256: 8d43f9ed35d2c020adb009f55f04b0592d28665983d77cee5ce38f1dde1254f9

Contents?: true

Size: 267 Bytes

Versions: 2

Compression:

Stored size: 267 Bytes

Contents

require 'sinatra/base'

module Monocle
  class Server < Sinatra::Base
    post '/:type/:id(.:format)' do
      if object = params[:type].classify.constantize.find(params[:id])
        object.view!
        'o_0 +1'
      else
        'o_0'
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
monocle-0.2.1 lib/monocle/server.rb
monocle-0.2.0 lib/monocle/server.rb