Class: RSS::Maker::RSS10::Channel
Relationships & Source Files | |
Namespace Children | |
Classes:
| |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
|
|
Inherits: |
RSS::Maker::ChannelBase
|
Defined in: | lib/rss/maker/1.0.rb |
Constant Summary
::RSS::Maker::Base - Inherited
Class Method Summary
::RSS::Maker::Base - Inherited
::RSS::Utils::InheritedReader - Extended
Instance Attribute Summary
::RSS::Maker::ChannelBase - Inherited
::RSS::Maker::Base - Inherited
Instance Method Summary
- #to_feed(rss)
- #not_set_required_variables private
- #required_variable_names private
- #setup_image(rss) private
- #setup_items(rss) private
- #setup_textinput(rss) private
::RSS::Maker::SetupDefaultLanguage - Included
::RSS::Maker::ChannelBase - Inherited
::RSS::Maker::SetupDefaultDate - Included
::RSS::Maker::Base - Inherited
Constructor Details
This class inherits a constructor from RSS::Maker::Base
Instance Method Details
#not_set_required_variables (private)
[ GitHub ]# File 'lib/rss/maker/1.0.rb', line 85
def not_set_required_variables vars = super vars << "description" unless description {|d| d.have_required_values?} vars << "title" unless title {|t| t.have_required_values?} vars end
#required_variable_names (private)
[ GitHub ]# File 'lib/rss/maker/1.0.rb', line 81
def required_variable_names %w(about link) end
#setup_image(rss) (private)
[ GitHub ]#setup_items(rss) (private)
# File 'lib/rss/maker/1.0.rb', line 50
def setup_items(rss) items = RDF::Channel::Items.new seq = items.Seq set_parent(items, seq) target_items = @maker.items.normalize raise NotSetError.new("maker", ["items"]) if target_items.empty? target_items.each do |item| li = RDF::Channel::Items::Seq::Li.new(item.link) seq.lis << li set_parent(li, seq) end rss.channel.items = items set_parent(rss.channel, items) end
#setup_textinput(rss) (private)
[ GitHub ]#to_feed(rss)
[ GitHub ]# File 'lib/rss/maker/1.0.rb', line 30
def to_feed(rss) set_default_values do _not_set_required_variables = not_set_required_variables if _not_set_required_variables.empty? channel = RDF::Channel.new(@about) setup_values(channel) channel.dc_dates.clear rss.channel = channel set_parent(channel, rss) setup_items(rss) setup_image(rss) setup_textinput(rss) setup_other_elements(rss, channel) else raise NotSetError.new("maker.channel", _not_set_required_variables) end end end