Sha256: 90d06420471fbec3347e994a50b9a94c4c8b21c7fe65a7067d7ff3bb1905d699

Contents?: true

Size: 588 Bytes

Versions: 3

Compression:

Stored size: 588 Bytes

Contents

module Sinatra
  module RocketIO
    module Linda

      def self.javascript(*js_file_names)
        js_file_names = ['rocketio.js', 'linda.js']
        js = ''
        js_file_names.each do |i|
          js += case i
                when 'rocketio.js'
                  Sinatra::RocketIO.javascript
                else
                  j = ''
                  File.open(File.expand_path "../js/#{i}", File.dirname(__FILE__)) do |f|
                    j = f.read
                  end
                  j
                end + "\n"
        end
        js
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sinatra-rocketio-linda-0.0.7 lib/sinatra-rocketio-linda/javascript.rb
sinatra-rocketio-linda-0.0.6 lib/sinatra-rocketio-linda/javascript.rb
sinatra-rocketio-linda-0.0.5 lib/sinatra-rocketio-linda/javascript.rb