Class: ActionView::Helpers::AtomFeedHelper::AtomFeedBuilder

Inherits:
AtomBuilder show all
Defined in:
actionpack/lib/action_view/helpers/atom_feed_helper.rb

Constant Summary

Constant Summary

Constants inherited from AtomBuilder

ActionView::Helpers::AtomFeedHelper::AtomBuilder::XHTML_TAG_NAMES

Instance Method Summary (collapse)

Constructor Details

- (AtomFeedBuilder) initialize(xml, view, feed_options = {})

A new instance of AtomFeedBuilder



162
163
164
# File 'actionpack/lib/action_view/helpers/atom_feed_helper.rb', line 162

def initialize(xml, view, feed_options = {})
  @xml, @view, @feed_options = xml, view, feed_options
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ActionView::Helpers::AtomFeedHelper::AtomBuilder

Instance Method Details

- (Object) updated(date_or_time = nil)

Accepts a Date or Time object and inserts it in the proper format. If nil is passed, current time in UTC is used.



167
168
169
# File 'actionpack/lib/action_view/helpers/atom_feed_helper.rb', line 167

def updated(date_or_time = nil)
  @xml.updated((date_or_time || Time.now.utc).xmlschema)
end