Sha256: 4a6d9bf6d351b59b0e4eb6c0e6b7c6c17f1de55d23802fdced1249cbef050f44

Contents?: true

Size: 520 Bytes

Versions: 3

Compression:

Stored size: 520 Bytes

Contents

require 'sinatra/base'
require 'data'
require 'json'

module Rubrowser
  class Server < Sinatra::Base
    get '/' do
      data = Rubrowser::Data.instance
      haml :index,
           locals: {
             constants: data.constants,
             occurences: data.occurences
           }
    end

    def self.start
      Rubrowser::Data.instance.parse
      Thread.new do
        run! host: 'localhost',
             port: 9000,
             root: File.expand_path('../../', __FILE__)
      end.join
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rubrowser-0.1.2 lib/server.rb
rubrowser-0.1.1 lib/server.rb
rubrowser-0.1.0 lib/server.rb