123456789_123456789_123456789_123456789_123456789_

Module: RSS::Utils::InheritedReader

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Extended In:
::RSS::Atom::Entry, ::RSS::Atom::Feed, ::RSS::Atom::Feed::Author, ::RSS::Atom::Feed::Category, ::RSS::Atom::Feed::Contributor, ::RSS::Atom::Feed::Entry, ::RSS::Atom::Feed::Entry::Content, ::RSS::Atom::Feed::Entry::Published, ::RSS::Atom::Feed::Entry::Source, ::RSS::Atom::Feed::Entry::Summary, ::RSS::Atom::Feed::Generator, ::RSS::Atom::Feed::Icon, ::RSS::Atom::Feed::Id, ::RSS::Atom::Feed::Link, ::RSS::Atom::Feed::Logo, ::RSS::Atom::Feed::Rights, ::RSS::Atom::Feed::Subtitle, ::RSS::Atom::Feed::Title, ::RSS::Atom::Feed::Updated, ::RSS::Atom::PersonConstruct::Email, ::RSS::Atom::PersonConstruct::Name, ::RSS::Atom::PersonConstruct::Uri, ::RSS::Element, ::RSS::ITunesChannelModel::ITunesCategory, ::RSS::ITunesChannelModel::ITunesImage, ::RSS::ITunesChannelModel::ITunesOwner, ::RSS::ITunesItemModel::ITunesDuration, ::RSS::ImageFaviconModel::ImageFavicon, ::RSS::ImageItemModel::ImageItem, ::RSS::Maker::Atom::Entry, ::RSS::Maker::Atom::Entry::Channel, ::RSS::Maker::Atom::Entry::Image, ::RSS::Maker::Atom::Entry::Items, ::RSS::Maker::Atom::Entry::Textinput, ::RSS::Maker::Atom::Feed, ::RSS::Maker::Atom::Feed::Channel, ::RSS::Maker::Atom::Feed::Image, ::RSS::Maker::Atom::Feed::Items, ::RSS::Maker::Atom::Feed::Textinput, ::RSS::Maker::Base, ::RSS::Maker::ChannelBase, ::RSS::Maker::ChannelBase::AuthorsBase, ::RSS::Maker::ChannelBase::AuthorsBase::AuthorBase, ::RSS::Maker::ChannelBase::CategoriesBase, ::RSS::Maker::ChannelBase::CategoriesBase::CategoryBase, ::RSS::Maker::ChannelBase::CloudBase, ::RSS::Maker::ChannelBase::ContributorsBase, ::RSS::Maker::ChannelBase::ContributorsBase::ContributorBase, ::RSS::Maker::ChannelBase::CopyrightBase, ::RSS::Maker::ChannelBase::DescriptionBase, ::RSS::Maker::ChannelBase::GeneratorBase, ::RSS::Maker::ChannelBase::LinksBase, ::RSS::Maker::ChannelBase::LinksBase::LinkBase, ::RSS::Maker::ChannelBase::SkipDaysBase, ::RSS::Maker::ChannelBase::SkipDaysBase::DayBase, ::RSS::Maker::ChannelBase::SkipHoursBase, ::RSS::Maker::ChannelBase::SkipHoursBase::HourBase, ::RSS::Maker::ChannelBase::TitleBase, ::RSS::Maker::ITunesChannelModel::ITunesCategoriesBase, ::RSS::Maker::ITunesChannelModel::ITunesCategoriesBase::ITunesCategoryBase, ::RSS::Maker::ITunesChannelModel::ITunesImageBase, ::RSS::Maker::ITunesChannelModel::ITunesOwnerBase, ::RSS::Maker::ITunesItemModel::ITunesDurationBase, ::RSS::Maker::ImageBase, ::RSS::Maker::ImageFaviconModel::ImageFaviconBase, ::RSS::Maker::ImageItemModel::ImageItemBase, ::RSS::Maker::ItemsBase, ::RSS::Maker::ItemsBase::ItemBase, ::RSS::Maker::ItemsBase::ItemBase::ContentBase, ::RSS::Maker::ItemsBase::ItemBase::DescriptionBase, ::RSS::Maker::ItemsBase::ItemBase::EnclosureBase, ::RSS::Maker::ItemsBase::ItemBase::GuidBase, ::RSS::Maker::ItemsBase::ItemBase::RightsBase, ::RSS::Maker::ItemsBase::ItemBase::SourceBase, ::RSS::Maker::ItemsBase::ItemBase::SourceBase::IconBase, ::RSS::Maker::ItemsBase::ItemBase::SourceBase::LogoBase, ::RSS::Maker::ItemsBase::ItemBase::SourceBase::RightsBase, ::RSS::Maker::ItemsBase::ItemBase::SourceBase::SubtitleBase, ::RSS::Maker::ItemsBase::ItemBase::SourceBase::TitleBase, ::RSS::Maker::ItemsBase::ItemBase::TitleBase, ::RSS::Maker::RSS09, ::RSS::Maker::RSS091, ::RSS::Maker::RSS091::Channel, ::RSS::Maker::RSS091::Image, ::RSS::Maker::RSS091::Items, ::RSS::Maker::RSS091::Textinput, ::RSS::Maker::RSS092, ::RSS::Maker::RSS092::Channel, ::RSS::Maker::RSS092::Image, ::RSS::Maker::RSS092::Items, ::RSS::Maker::RSS092::Textinput, ::RSS::Maker::RSS09::Channel, ::RSS::Maker::RSS09::Image, ::RSS::Maker::RSS09::Items, ::RSS::Maker::RSS09::Textinput, ::RSS::Maker::RSS10, ::RSS::Maker::RSS10::Channel, ::RSS::Maker::RSS10::Image, ::RSS::Maker::RSS10::Items, ::RSS::Maker::RSS10::Textinput, ::RSS::Maker::RSS20, ::RSS::Maker::RSS20::Channel, ::RSS::Maker::RSS20::Image, ::RSS::Maker::RSS20::Items, ::RSS::Maker::RSS20::Textinput, ::RSS::Maker::RSSBase, ::RSS::Maker::TaxonomyTopicModel::TaxonomyTopicsBase, ::RSS::Maker::TaxonomyTopicModel::TaxonomyTopicsBase::TaxonomyTopicBase, ::RSS::Maker::TaxonomyTopicsModel::TaxonomyTopicsBase, ::RSS::Maker::TextinputBase, ::RSS::Maker::TrackBackModel::TrackBackAboutsBase, ::RSS::Maker::TrackBackModel::TrackBackAboutsBase::TrackBackAboutBase, ::RSS::Maker::XMLStyleSheets, ::RSS::Maker::XMLStyleSheets::XMLStyleSheet, ::RSS::RDF, ::RSS::RDF::Bag, ::RSS::RDF::Channel, ::RSS::RDF::Channel::Image, ::RSS::RDF::Channel::Items, ::RSS::RDF::Channel::Textinput, ::RSS::RDF::Image, ::RSS::RDF::Item, ::RSS::RDF::Li, ::RSS::RDF::Seq, ::RSS::RDF::Textinput, ::RSS::Rss, ::RSS::Rss::Channel, ::RSS::Rss::Channel::Cloud, ::RSS::Rss::Channel::Image, ::RSS::Rss::Channel::Item, ::RSS::Rss::Channel::Item::Category, ::RSS::Rss::Channel::Item::Enclosure, ::RSS::Rss::Channel::Item::Guid, ::RSS::Rss::Channel::Item::Source, ::RSS::Rss::Channel::SkipDays, ::RSS::Rss::Channel::SkipDays::Day, ::RSS::Rss::Channel::SkipHours, ::RSS::Rss::Channel::SkipHours::Hour, ::RSS::Rss::Channel::TextInput, ::RSS::TaxonomyTopicModel::TaxonomyTopic, ::RSS::TaxonomyTopicsModel::TaxonomyTopics, RSS::TrackBackModel10::TrackBackAbout, RSS::TrackBackModel10::TrackBackPing, RSS::TrackBackModel20::TrackBackAbout, RSS::TrackBackModel20::TrackBackPing
Defined in: lib/rss/utils.rb

Class Method Summary

Class Method Details

.inherited_array_reader(constant_name) (mod_func)

[ GitHub ]

  
# File 'lib/rss/utils.rb', line 187

def inherited_array_reader(constant_name)
  inherited_reader(constant_name) do |result, current|
    current + result
  end
end

.inherited_hash_reader(constant_name) (mod_func)

[ GitHub ]

  
# File 'lib/rss/utils.rb', line 193

def inherited_hash_reader(constant_name)
  inherited_reader(constant_name) do |result, current|
    result.merge(current)
  end
end

.inherited_reader(constant_name) (mod_func)

[ GitHub ]

  
# File 'lib/rss/utils.rb', line 171

def inherited_reader(constant_name)
  base_class = inherited_base
  result = base_class.const_get(constant_name)
  found_base_class = false
  ancestors.reverse_each do |klass|
    if found_base_class
      if klass.const_defined?(constant_name)
        result = yield(result, klass.const_get(constant_name))
      end
    else
      found_base_class = klass == base_class
    end
  end
  result
end