Class: Linner::Wrapper::Module
- Inherits:
-
Object
- Object
- Linner::Wrapper::Module
- Defined in:
- lib/linner/wrapper.rb
Class Method Summary collapse
Class Method Details
.definition ⇒ Object
10 11 12 |
# File 'lib/linner/wrapper.rb', line 10 def self.definition File.read(File.join File.dirname(__FILE__), "../../vendor", "require_definition.js") end |
.wrap(name, content) ⇒ Object
4 5 6 7 8 |
# File 'lib/linner/wrapper.rb', line 4 def self.wrap(name, content) <<-WRAPPER this.require.define({"#{name}":function(exports, require, module){#{content};}}); WRAPPER end |