123456789_123456789_123456789_123456789_123456789_

Class: RSS::Maker::RSSBase

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Subclasses:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: RSS::Maker::Base
Defined in: lib/rss/maker/base.rb,
lib/rss/maker/taxonomy.rb

Constant Summary

Base - Inherited

NEED_INITIALIZE_VARIABLES, OTHER_ELEMENTS

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(feed_version) ⇒ RSSBase

[ GitHub ]

  
# File 'lib/rss/maker/base.rb', line 427

def initialize(feed_version)
  super(self)
  @feed_type = nil
  @feed_subtype = nil
  @feed_version = feed_version
  @version = "1.0"
  @encoding = "UTF-8"
  @standalone = nil
end

Class Method Details

.make(*args, &block)

[ GitHub ]

  
# File 'lib/rss/maker/base.rb', line 401

def make(*args, &block)
  new(*args).make(&block)
end

Instance Attribute Details

#encoding (rw)

[ GitHub ]

  
# File 'lib/rss/maker/base.rb', line 425

attr_accessor :version, :encoding, :standalone

#feed_version (readonly) Also known as: #rss_version

[ GitHub ]

  
# File 'lib/rss/maker/base.rb', line 423

attr_reader :feed_version

#rss_version (readonly)

Alias for #feed_version.

[ GitHub ]

  
# File 'lib/rss/maker/base.rb', line 424

alias_method(:rss_version, :feed_version)

#standalone (rw)

[ GitHub ]

  
# File 'lib/rss/maker/base.rb', line 425

attr_accessor :version, :encoding, :standalone

#version (rw)

[ GitHub ]

  
# File 'lib/rss/maker/base.rb', line 425

attr_accessor :version, :encoding, :standalone

Instance Method Details

#make {|_self| ... }

Yields:

  • (_self)

Yield Parameters:

  • _self (RSSBase)

    the object that the method was called on

[ GitHub ]

  
# File 'lib/rss/maker/base.rb', line 437

def make
  yield(self)
  to_feed
end

#make_xml_stylesheets (private)

[ GitHub ]

  
# File 'lib/rss/maker/base.rb', line 453

def make_xml_stylesheets
  XMLStyleSheets.new(self)
end

#to_feed

[ GitHub ]

  
# File 'lib/rss/maker/base.rb', line 442

def to_feed
  feed = make_feed
  setup_xml_stylesheets(feed)
  setup_elements(feed)
  setup_other_elements(feed)
  feed.validate
  feed
end