Sha256: 09df34d9ae0e7bbe855641fd2d7753db71628a02cacffa3a1e4caa5e7a8e8e3d

Contents?: true

Size: 390 Bytes

Versions: 1

Compression:

Stored size: 390 Bytes

Contents

require 'sinatra/base'

class App < Sinatra::Default
  set :root,   File.dirname(__FILE__) + "/.."
  set :app_file, __FILE__

  get '/' do
    haml :index
  end

  post '/segment' do
    @input = params[:input]
    @result = Rseg.segment(@input).join(' ')
    haml :index
  end

  post '/seg' do
    @input = params[:input]
    @result = Rseg.segment(@input)
    @result.join(' ')
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rseg-0.1.2 lib/app.rb