Module: Html2rss

Defined in:
lib/html2rss.rb,
lib/html2rss/item.rb,
lib/html2rss/config.rb,
lib/html2rss/version.rb,
lib/html2rss/feed_builder.rb,
lib/html2rss/item_extractor.rb,
lib/html2rss/attribute_post_processors.rb,
lib/html2rss/attribute_post_processors/template.rb,
lib/html2rss/attribute_post_processors/parse_uri.rb,
lib/html2rss/attribute_post_processors/substring.rb,
lib/html2rss/attribute_post_processors/parse_time.rb,
lib/html2rss/attribute_post_processors/sanitize_html.rb

Defined Under Namespace

Modules: AttributePostProcessors, ItemExtractor Classes: Config, FeedBuilder, Item

Constant Summary collapse

VERSION =
'0.2.0'.freeze

Class Method Summary collapse

Class Method Details

.feed(config) ⇒ Object



12
13
14
15
# File 'lib/html2rss.rb', line 12

def self.feed(config)
  feed = FeedBuilder.new config
  feed.rss
end

.feed_from_yaml_config(file, name) ⇒ Object



7
8
9
10
# File 'lib/html2rss.rb', line 7

def self.feed_from_yaml_config(file, name)
  config = Config.new(YAML.load(File.open(file)).freeze, name)
  feed(config)
end