module Lucy
Constants
- DEFAULT_GLOBAL
- DEFAULT_NAMESPACE
Public Class Methods
file(src_path, dest_path=nil)
click to toggle source
# File lib/lucy.rb, line 22 def self.file(src_path, dest_path=nil) File.cp(src_path, dest_path || javascript_dir) end
generate(key, content=nil, path=nil) { |g| ... }
click to toggle source
# File lib/lucy.rb, line 10 def self.generate(key, content=nil, path=nil) File.open(path || File.join(javascript_dir, "#{key}.js"), "w") do |f| g = JavascriptGenerator.new if block_given? yield g else g.write key, content end f.write g.to_js end end
javascript_dir()
click to toggle source
# File lib/lucy.rb, line 6 def self.javascript_dir @js_dir ||= File.join(Rails.root, "public", "javascripts") end