Module
Instance Methods
lib/rss/maker/base.rb
View on GitHub
# File tmp/rubies/ruby-2.4.10/lib/rss/maker/base.rb, line 375
def _parse_date_if_needed(date_value)
date_value = Time.parse(date_value) if date_value.is_a?(String)
date_value
end
No documentation available
lib/rss/maker/base.rb
View on GitHub
# File tmp/rubies/ruby-2.4.10/lib/rss/maker/base.rb, line 357
def _set_default_values
keep = {
:date => date,
:dc_dates => dc_dates.to_a.dup,
}
_date = _parse_date_if_needed(date)
if _date and !dc_dates.any? {|dc_date| dc_date.value == _date}
dc_date = self.class::DublinCoreDates::DublinCoreDate.new(self)
dc_date.value = _date.dup
dc_dates.unshift(dc_date)
end
self.date ||= self.dc_date
super
ensure
self.date = keep[:date]
dc_dates.replace(keep[:dc_dates])
end
No documentation available