Class: RSS::Maker::RSSBase
- Includes:
- TaxonomyTopicModel
- Defined in:
- lib/rss/maker/base.rb,
lib/rss/maker/taxonomy.rb
Direct Known Subclasses
Constant Summary
Constants inherited from Base
Base::NEED_INITIALIZE_VARIABLES, Base::OTHER_ELEMENTS
Instance Attribute Summary collapse
-
#encoding ⇒ Object
Returns the value of attribute encoding.
-
#feed_version ⇒ Object
(also: #rss_version)
readonly
Returns the value of attribute feed_version.
-
#standalone ⇒ Object
Returns the value of attribute standalone.
-
#version ⇒ Object
Returns the value of attribute version.
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(feed_version) ⇒ RSSBase
constructor
A new instance of RSSBase.
- #make ⇒ Object
- #to_feed ⇒ Object
Methods included from TaxonomyTopicModel
append_features, install_taxo_topic
Methods inherited from Base
add_need_initialize_variable, add_other_element, def_array_element, def_classed_element, def_classed_element_without_accessor, def_classed_elements, def_csv_element, def_other_element, def_other_element_without_accessor, #have_required_values?, inherited, inherited_base, need_initialize_variables, other_elements, #variable_is_set?
Methods included from Utils::InheritedReader
#inherited_array_reader, #inherited_hash_reader, #inherited_reader
Constructor Details
#initialize(feed_version) ⇒ RSSBase
Returns a new instance of RSSBase.
384 385 386 387 388 389 390 391 392 |
# File 'lib/rss/maker/base.rb', line 384 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 |
Instance Attribute Details
#encoding ⇒ Object
Returns the value of attribute encoding.
382 383 384 |
# File 'lib/rss/maker/base.rb', line 382 def encoding @encoding end |
#feed_version ⇒ Object (readonly) Also known as: rss_version
Returns the value of attribute feed_version.
380 381 382 |
# File 'lib/rss/maker/base.rb', line 380 def feed_version @feed_version end |
#standalone ⇒ Object
Returns the value of attribute standalone.
382 383 384 |
# File 'lib/rss/maker/base.rb', line 382 def standalone @standalone end |
#version ⇒ Object
Returns the value of attribute version.
382 383 384 |
# File 'lib/rss/maker/base.rb', line 382 def version @version end |
Class Method Details
.make(version, &block) ⇒ Object
360 361 362 |
# File 'lib/rss/maker/base.rb', line 360 def make(version, &block) new(version).make(&block) end |
Instance Method Details
#make ⇒ Object
394 395 396 397 398 399 400 401 |
# File 'lib/rss/maker/base.rb', line 394 def make if block_given? yield(self) to_feed else nil end end |
#to_feed ⇒ Object
403 404 405 406 407 408 409 410 411 412 413 |
# File 'lib/rss/maker/base.rb', line 403 def to_feed feed = make_feed setup_xml_stylesheets(feed) setup_elements(feed) setup_other_elements(feed) if feed.valid? feed else nil end end |