Sha256: f33dd5d3a8215185be098ce3761ebc9a3f623ca18ec976b01b51b01cc2e5e62b
Contents?: true
Size: 534 Bytes
Versions: 1
Compression:
Stored size: 534 Bytes
Contents
require 'rubygems' require 'activesupport' module Scraper autoload :Article, 'scraper/article' autoload :Youtube, 'scraper/youtube' autoload :Vimeo, 'scraper/vimeo' autoload :Modules, 'scraper/modules' HANDLERS = [ :Youtube, :Article ] end def Scraper( args = {} ) if handler = Scraper::HANDLERS.detect { |h| Scraper.const_get(h) =~ args } Scraper.const_get( handler ).new( args ) else raise ArgumentError, "Scraper cannot handle content from #{args}" end end $LOAD_PATH.unshift( File.dirname(__FILE__) )
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cyx-scraper-0.3.0 | lib/scraper.rb |