Methods
F
N
O
S
T
Included Modules
Attributes
[RW] encoding
[R] feed_subtype
[R] feed_type
[R] feed_version
[R] output_encoding
[RW] standalone
[RW] version
Class Public methods
new(feed_version, version=nil, encoding=nil, standalone=nil)
# File lib/rss/rss.rb, line 1257
def initialize(feed_version, version=nil, encoding=nil, standalone=nil)
  super()
  @feed_type = nil
  @feed_subtype = nil
  @feed_version = feed_version
  @version = version || '1.0'
  @encoding = encoding
  @standalone = standalone
  @output_encoding = nil
end
Instance Public methods
feed_info()
# File lib/rss/rss.rb, line 1268
def feed_info
  [@feed_type, @feed_version, @feed_subtype]
end
output_encoding=(enc)
# File lib/rss/rss.rb, line 1272
def output_encoding=(enc)
  @output_encoding = enc
  self.converter = Converter.new(@output_encoding, @encoding)
end
setup_maker(maker)
# File lib/rss/rss.rb, line 1277
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)
# File lib/rss/rss.rb, line 1300
def to_atom(type, &block)
  to_feed("atom:#{type}", &block)
end
to_feed(type, &block)
# File lib/rss/rss.rb, line 1289
def to_feed(type, &block)
  Maker.make(type) do |maker|
    setup_maker(maker)
    block.call(maker) if block
  end
end
to_rss(type, &block)
# File lib/rss/rss.rb, line 1296
def to_rss(type, &block)
  to_feed("rss#{type}", &block)
end
to_xml(type=nil, &block)
# File lib/rss/rss.rb, line 1304
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