Sha256: 1a12cf133ef8e350f84d4ba52ec6c5c65850fe0073a2c02df88e6e48e332fb83

Contents?: true

Size: 261 Bytes

Versions: 4

Compression:

Stored size: 261 Bytes

Contents

module Parade

  module LiveRuby

    def self.included(server)
      server.get '/eval_ruby' do
        eval_ruby(params[:code])
      end
    end

    def eval_ruby(code)
      eval(code).to_s
    rescue => exception
      exception.message
    end
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
parade-0.9.0 lib/parade/features/live_ruby.rb
parade-0.8.2 lib/parade/features/live_ruby.rb
parade-0.8.1 lib/parade/features/live_ruby.rb
parade-0.8.0 lib/parade/features/live_ruby.rb