Module: UzuUzu::Helper::XHtml
- Defined in:
- lib/uzuuzu-core/helper/xhtml.rb
Instance Method Summary collapse
- #css(css_path, media = 'screen') ⇒ Object
- #css_for(*args) ⇒ Object
- #js(js_path) ⇒ Object
- #js_for(*args) ⇒ Object
- #meta(name, content) ⇒ Object
Instance Method Details
#css(css_path, media = 'screen') ⇒ Object
16 17 18 |
# File 'lib/uzuuzu-core/helper/xhtml.rb', line 16 def css(css_path, media='screen') "<link href=\"#{css_path}\" media=\"#{media}\" rel=\"stylesheet\" type=\"text/css\" />" end |
#css_for(*args) ⇒ Object
22 23 24 25 26 |
# File 'lib/uzuuzu-core/helper/xhtml.rb', line 22 def css_for(*args) args.map do |css_path| css(css_path) end.join("\n") end |
#js(js_path) ⇒ Object
30 31 32 |
# File 'lib/uzuuzu-core/helper/xhtml.rb', line 30 def js(js_path) "<script src=\"#{js_path}\" type=\"text/javascript\"></script>" end |
#js_for(*args) ⇒ Object
36 37 38 39 40 |
# File 'lib/uzuuzu-core/helper/xhtml.rb', line 36 def js_for(*args) args.map do |js_path| js(js_path) end.join("\n") end |
#meta(name, content) ⇒ Object
10 11 12 |
# File 'lib/uzuuzu-core/helper/xhtml.rb', line 10 def (name, content) "<meta name=\"#{name}\" content=\"#{content}\">" end |