Parent

Class Index [+]

Quicksearch

Erector::Widget

Public Instance Methods

css(href, args = {}) click to toggle source

Generate a stylesheet tag.

@example

  css 'css/reset.css', :media => 'print'

@param [String] href The path (either absolute or relative) to the CSS

 file.

@param [Hash] args A hash containing additional arguments to add to

 the CSS tag.
     # File lib/ramaze/helper/erector.rb, line 101
101:         def css(href, args = {})
102:           attrs = {
103:             :rel => "stylesheet",
104:             :href => href,
105:             :type => "text/css"
106:           }.merge(args)
107: 
108:           link attrs
109:         end
Also aliased as: old_css
ie_if(expr, &block) click to toggle source

Generate a pair of conditional tags for a specific browser.

@example

  ie_if 'IE' do
    ......
  end

@param [String] expr The if expression, such as ‘IE’ or ‘lte IE7’. @param [block] block Block that contains the data that needs to be

 loaded for the specified browser.
    # File lib/ramaze/helper/erector.rb, line 75
75:         def ie_if(expr, &block)
76:           raw! "<!--[if #{expr}]>"
77:           yield
78:           raw! "<![endif]-->"
79:         end
inspect(elem) click to toggle source

Inspect the specified element.

@param [String] elem The element to inspect.

    # File lib/ramaze/helper/erector.rb, line 86
86:         def inspect(elem)
87:           text elem.inspect
88:         end
js(src) click to toggle source

Generate a Javascript tag.

@example

  js 'javascript/jquery.js'

@param [String] src The full or relative path to the Javascript file.

    # File lib/ramaze/helper/erector.rb, line 59
59:         def js(src)
60:           script :src => src
61:         end
old_css(href, args = {}) click to toggle source
Alias for: css
strict_xhtml(*args, &block) click to toggle source

Method that generates a XHTML 1.0 Strict doctype.

@example

  strict_html do
    head do
      title "Ramaze Rocks!"
    end
    body
      div do

      end
    end
  end

@param [Hash] args Hash containing extra options such as the xml:lang

 and xmlns attribute.

@param [Block] block Block that contains the inner data of the

 element.
    # File lib/ramaze/helper/erector.rb, line 45
45:         def strict_xhtml(*args, &block)
46:           raw! '<?xml version="1.0" encoding="UTF-8"?>'
47:           raw! '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">'
48:           html(:xmlns => "http://www.w3.org/1999/xhtml", :"xml:lang" => "en", :lang => "en", &block)
49:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.