feed_info()
click to toggle source
def feed_info
[@feed_type, @feed_version, @feed_subtype]
end
output_encoding=(enc)
click to toggle source
def output_encoding=(enc)
@output_encoding = enc
self.converter = Converter.new(@output_encoding, @encoding)
end
setup_maker(maker)
click to toggle source
def setup_maker(maker)
maker.version = version
maker.encoding = encoding
maker.standalone = standalone
xml_stylesheets.each do |xss|
xss.setup_maker(maker)
end
super
end
to_atom(type, &block)
click to toggle source
def to_atom(type, &block)
to_feed("atom:#{type}", &block)
end
to_feed(type, &block)
click to toggle source
def to_feed(type, &block)
Maker.make(type) do |maker|
setup_maker(maker)
block.call(maker) if block
end
end
to_xml(type=nil, &block)
click to toggle source
def to_xml(type=nil, &block)
if type.nil? or same_feed_type?(type)
to_s
else
to_feed(type, &block).to_s
end
end