Method: Pupu::DSL#javascript
- Defined in:
- lib/pupu/dsl.rb
#javascript(basename, params = Hash.new) ⇒ Object
59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/pupu/dsl.rb', line 59 def javascript(basename, params = Hash.new) path = @pupu.javascript(basename).url tag = "<script src='#{path}' type='text/javascript'></script>" if params[:if] tag = "<!--[if #{params[:if]}]>" + tag + "<![endif]-->" end unless files.include?(path) files.push(path) @output.push(tag) end end |