module FeedNormalizer::TimeFix
Public Instance Methods
reparse(obj)
click to toggle source
Reparse any Time instances, due to RSS::Parser's redefinition of certain aspects of the Time class that creates unexpected behaviour when extending the Time class, as some common third party libraries do. See code.google.com/p/feed-normalizer/issues/detail?id=13.
# File lib/structures.rb, line 123 def reparse(obj) @parsed ||= false return obj if @parsed if obj.is_a?(Time) @parsed = true Time.at(obj) rescue obj end end