Class: ActionView::Helpers::AtomFeedHelper::AtomBuilder
- Inherits:
-
Object
- Object
- ActionView::Helpers::AtomFeedHelper::AtomBuilder
- Defined in:
- actionpack/lib/action_view/helpers/atom_feed_helper.rb
Constant Summary
Instance Method Summary (collapse)
-
- (AtomBuilder) initialize(xml)
constructor
A new instance of AtomBuilder.
Constructor Details
- (AtomBuilder) initialize(xml)
A new instance of AtomBuilder
130 131 132 |
# File 'actionpack/lib/action_view/helpers/atom_feed_helper.rb', line 130 def initialize(xml) @xml = xml end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
- (Object) method_missing(method, *arguments, &block) (private)
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.
138 139 140 141 142 143 144 145 146 147 148 |
# File 'actionpack/lib/action_view/helpers/atom_feed_helper.rb', line 138 def method_missing(method, *arguments, &block) if xhtml_block?(method, arguments) @xml.__send__(method, *arguments) do @xml.div(:xmlns => 'http://www.w3.org/1999/xhtml') do |xhtml| block.call(xhtml) end end else @xml.__send__(method, *arguments, &block) end end |