Module: Feedjira::FeedUtilities::ClassMethods

Defined in:
lib/feedjira/feed_utilities.rb

Instance Method Summary collapse

Instance Method Details

#parse(xml, &block) ⇒ Object



13
14
15
16
17
# File 'lib/feedjira/feed_utilities.rb', line 13

def parse(xml, &block)
  xml = xml.lstrip
  xml = preprocess(xml) if preprocess_xml
  super xml, &block
end

#preprocess(xml) ⇒ Object



19
20
21
22
# File 'lib/feedjira/feed_utilities.rb', line 19

def preprocess(xml)
  # noop
  xml
end

#preprocess_xmlObject



28
29
30
# File 'lib/feedjira/feed_utilities.rb', line 28

def preprocess_xml
  @preprocess_xml
end

#preprocess_xml=(value) ⇒ Object



24
25
26
# File 'lib/feedjira/feed_utilities.rb', line 24

def preprocess_xml=(value)
  @preprocess_xml = value
end