Sha256: 35a93a6f66b13333bdfc2289ef0554ab9d9f5724336b53ae856625b412d6e906

Contents?: true

Size: 470 Bytes

Versions: 10

Compression:

Stored size: 470 Bytes

Contents

require 'sinatra/base'

module Robut
  class Web < Sinatra::Base
    helpers do
      # Say something to all connected rooms. Delegates to #reply
      def say(*args)
        reply(*args)
      end

      # Easy access to the current connection context.
      def connection
        settings.connection
      end

      # Delegates to Connection#reply
      def reply(*args)
        connection.reply(*args)
      end
    end

    get '/' do
      'ok'
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
sclemmer-robut-0.6.3 lib/robut/web.rb
sclemmer-robut-0.6.2 lib/robut/web.rb
sclemmer-robut-0.6.1 lib/robut/web.rb
sclemmer-robut-0.6.0 lib/robut/web.rb
sclemmer-robut-0.5.4 lib/robut/web.rb
sclemmer-robut-0.5.3 lib/robut/web.rb
sclemmer-robut-0.5.2 lib/robut/web.rb
robut-0.5.2 lib/robut/web.rb
robut-0.5.1 lib/robut/web.rb
robut-0.5.0 lib/robut/web.rb