Class: Feedjira::Parser::ITunesRSSCategory
- Inherits:
-
Object
- Object
- Feedjira::Parser::ITunesRSSCategory
- Includes:
- SAXMachine
- Defined in:
- lib/feedjira/parser/itunes_rss_category.rb
Overview
iTunes extensions to the standard RSS2.0 item Source: help.apple.com/itc/podcasts_connect/#/itcb54353390
Instance Method Summary collapse
Instance Method Details
#each_path(ancestors = [], &block) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/feedjira/parser/itunes_rss_category.rb', line 25 def each_path(ancestors = [], &block) return to_enum(__method__, ancestors) unless block category_hierarchy = ancestors + [text] if itunes_categories.empty? yield category_hierarchy else itunes_categories.each do |itunes_category| itunes_category.each_path(category_hierarchy, &block) end end end |
#each_subcategory {|text| ... } ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/feedjira/parser/itunes_rss_category.rb', line 15 def each_subcategory(&block) return to_enum(__method__) unless block yield text itunes_categories.each do |itunes_category| itunes_category.each_subcategory(&block) end end |