Sha256: e0f294745ce8c70064eaca91150ff78f691362bf246b42cb345a9f4138d0bd7f

Contents?: true

Size: 361 Bytes

Versions: 28

Compression:

Stored size: 361 Bytes

Contents

module Sinatra
  module WebSocketIO

    def self.javascript(*js_file_names)
      js_file_names = ['websocketio.js', 'event_emitter.js'] if js_file_names.empty?
      js = ''
      js_file_names.each do |i|
        File.open(File.expand_path "../js/#{i}", File.dirname(__FILE__)) do |f|
          js += f.read
        end
      end
      js
    end

  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
sinatra-websocketio-0.4.1 lib/sinatra-websocketio/javascript.rb
sinatra-websocketio-0.4.0 lib/sinatra-websocketio/javascript.rb
sinatra-websocketio-0.3.9 lib/sinatra-websocketio/javascript.rb
sinatra-websocketio-0.3.7 lib/sinatra-websocketio/javascript.rb
sinatra-websocketio-0.3.6 lib/sinatra-websocketio/javascript.rb
sinatra-websocketio-0.3.5 lib/sinatra-websocketio/javascript.rb
sinatra-websocketio-0.3.4 lib/sinatra-websocketio/javascript.rb
sinatra-websocketio-0.3.3 lib/sinatra-websocketio/javascript.rb
sinatra-websocketio-0.3.2 lib/sinatra-websocketio/javascript.rb
sinatra-websocketio-0.3.1 lib/sinatra-websocketio/javascript.rb
sinatra-websocketio-0.3.0 lib/sinatra-websocketio/javascript.rb
sinatra-websocketio-0.2.9 lib/sinatra-websocketio/javascript.rb
sinatra-websocketio-0.2.8 lib/sinatra-websocketio/javascript.rb
sinatra-websocketio-0.2.7 lib/sinatra-websocketio/javascript.rb
sinatra-websocketio-0.2.6 lib/sinatra-websocketio/javascript.rb
sinatra-websocketio-0.2.5 lib/sinatra-websocketio/javascript.rb
sinatra-websocketio-0.2.4 lib/sinatra-websocketio/javascript.rb
sinatra-websocketio-0.2.3 lib/sinatra-websocketio/javascript.rb
sinatra-websocketio-0.2.2 lib/sinatra-websocketio/javascript.rb
sinatra-websocketio-0.2.1 lib/sinatra-websocketio/javascript.rb