Parent

Class Index [+]

Quicksearch

ActionView::Helpers::AtomFeedHelper::AtomBuilder

Constants

XHTML_TAG_NAMES

Public Class Methods

new(xml) click to toggle source
     # File lib/action_view/helpers/atom_feed_helper.rb, line 130
130:         def initialize(xml)
131:           @xml = xml
132:         end

Private Instance Methods

method_missing(method, *arguments, &block) click to toggle source

Delegate to xml builder, first wrapping the element in a xhtml namespaced div element if the method and arguments indicate that an xhtml_block? is desired.

     # File lib/action_view/helpers/atom_feed_helper.rb, line 138
138:           def method_missing(method, *arguments, &block)
139:             if xhtml_block?(method, arguments)
140:               @xml.__send__(method, *arguments) do
141:                 @xml.div(:xmlns => 'http://www.w3.org/1999/xhtml') do |xhtml|
142:                   block.call(xhtml)
143:                 end
144:               end
145:             else
146:               @xml.__send__(method, *arguments, &block)
147:             end
148:           end
xhtml_block?(method, arguments) click to toggle source

True if the method name matches one of the five elements defined in the Atom spec as potentially containing XHTML content and if :type => ‘xhtml’ is, in fact, specified.

     # File lib/action_view/helpers/atom_feed_helper.rb, line 153
153:           def xhtml_block?(method, arguments)
154:             if XHTML_TAG_NAMES.include?(method.to_s)
155:               last = arguments.last
156:               last.is_a?(Hash) && last[:type].to_s == 'xhtml'
157:             end
158:           end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.