lib/linner/wrapper.rb in linner-0.1.0 vs lib/linner/wrapper.rb in linner-0.1.1
- old
+ new
@@ -1,17 +1,13 @@
module Linner
class Wrapper
+ WRAPPER =
+ 'window.require.define({"%s":' +
+ 'function(exports, require, module){' +
+ '%s' +
+ ";}});\n"
- class << self
- def wrapper
- 'window.require.define({"%s":' +
- 'function(exports, require, module){' +
- '%s' +
- ";}});\n"
- end
-
- def wrap(name, content)
- wrapper % [name, content]
- end
+ def self.wrap(name, content)
+ WRAPPER % [name, content]
end
end
end