Class: RSS::Maker::Atom::Feed::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/feed.rb |
Constant Summary
::RSS::Maker::Base
- Inherited
Class Method Summary
::RSS::Maker::Base
- Inherited
::RSS::Utils::InheritedReader
- Extended
Instance Attribute Summary
- #have_required_values? ⇒ Boolean readonly
- #variable_is_set? ⇒ Boolean readonly private
::RSS::Maker::ChannelBase
- Inherited
::RSS::Maker::Base
- Inherited
Instance Method Summary
- #to_feed(feed)
- #_set_default_values(&block) private
- #not_set_required_variables private
- #required_variable_names private
- #variables 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 Attribute Details
#have_required_values? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'lib/rss/maker/feed.rb', line 45
def have_required_values? super and (! .empty? or @maker.items.any? {|item| !item. .empty?}) end
#variable_is_set? ⇒ Boolean
(readonly, private)
[ GitHub ]
# File 'lib/rss/maker/feed.rb', line 60
def variable_is_set? super or ! .empty? end
Instance Method Details
#_set_default_values(&block) (private)
[ GitHub ]# File 'lib/rss/maker/feed.rb', line 74
def _set_default_values(&block) keep = { :id => id, } self.id ||= about super(&block) ensure self.id = keep[:id] end
#not_set_required_variables (private)
[ GitHub ]# File 'lib/rss/maker/feed.rb', line 64
def not_set_required_variables vars = super if .empty? and @maker.items.all? {|item| item. .to_s.empty?} vars << "author" end vars << "title" unless title {|t| t.have_required_values?} vars end
#required_variable_names (private)
[ GitHub ]# File 'lib/rss/maker/feed.rb', line 52
def required_variable_names %w(id updated) end
#to_feed(feed)
[ GitHub ]# File 'lib/rss/maker/feed.rb', line 28
def to_feed(feed) set_default_values do setup_values(feed) feed.dc_dates.clear setup_other_elements(feed) if image_favicon.about icon = feed.class::Icon.new icon.content = image_favicon.about feed.icon = icon end unless have_required_values? raise NotSetError.new("maker.channel", not_set_required_variables) end end end
#variables (private)
[ GitHub ]# File 'lib/rss/maker/feed.rb', line 56
def variables super + %w(id updated) end