module Polyfillrb

Constants

PROJECT_DIRECTORY
VERSION

Public Class Methods

get_polyfills(ua, minify=false) click to toggle source

Method to get the polyfills

Params

ua -> User Agent String
minify -> Boolean if code should be minified or not

returns String

# File lib/polyfillrb.rb, line 15
def self.get_polyfills(ua, minify=false)
  return %x( node #{PROJECT_DIRECTORY}/polyfill.js -p "#{ua}" #{minify})
end
has_built_sources?() click to toggle source

Detects if the service has installed it’s dependencies

# File lib/polyfillrb.rb, line 26
def self.has_built_sources?
  Dir.exist?(PROJECT_DIRECTORY+'/polyfill-service/node_modules/')
end
has_installed_service?() click to toggle source

Detects if the service has been downloaded from git yet

# File lib/polyfillrb.rb, line 21
def self.has_installed_service?
  Dir.exist?(PROJECT_DIRECTORY+'/polyfill-service/')
end