Sha256: 6f43f74c397cfd2c9d6952552ecd549052783aa7184b481522ce80b5a37b6fd6

Contents?: true

Size: 353 Bytes

Versions: 22

Compression:

Stored size: 353 Bytes

Contents

module Sinatra
  module CometIO

    def self.javascript(*js_file_names)
      js_file_names = ['cometio.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

22 entries across 22 versions & 1 rubygems

Version Path
sinatra-cometio-0.6.0 lib/sinatra-cometio/javascript.rb
sinatra-cometio-0.5.9 lib/sinatra-cometio/javascript.rb
sinatra-cometio-0.5.8 lib/sinatra-cometio/javascript.rb
sinatra-cometio-0.5.7 lib/sinatra-cometio/javascript.rb
sinatra-cometio-0.5.6 lib/sinatra-cometio/javascript.rb
sinatra-cometio-0.5.5 lib/sinatra-cometio/javascript.rb
sinatra-cometio-0.5.4 lib/sinatra-cometio/javascript.rb
sinatra-cometio-0.5.3 lib/sinatra-cometio/javascript.rb
sinatra-cometio-0.5.2 lib/sinatra-cometio/javascript.rb
sinatra-cometio-0.5.1 lib/sinatra-cometio/javascript.rb
sinatra-cometio-0.5.0 lib/sinatra-cometio/javascript.rb
sinatra-cometio-0.4.3 lib/sinatra-cometio/javascript.rb
sinatra-cometio-0.4.2 lib/sinatra-cometio/javascript.rb
sinatra-cometio-0.4.1 lib/sinatra-cometio/javascript.rb
sinatra-cometio-0.4.0 lib/sinatra-cometio/javascript.rb
sinatra-cometio-0.3.9 lib/sinatra-cometio/javascript.rb
sinatra-cometio-0.3.8 lib/sinatra-cometio/javascript.rb
sinatra-cometio-0.3.7 lib/sinatra-cometio/javascript.rb
sinatra-cometio-0.3.6 lib/sinatra-cometio/javascript.rb
sinatra-cometio-0.3.5 lib/sinatra-cometio/javascript.rb