Sha256: 5a04f24c79f4ec60cbf7fbc18f3cb832d1095ad110d9b2a04283aae27169c4cc

Contents?: true

Size: 506 Bytes

Versions: 4

Compression:

Stored size: 506 Bytes

Contents

module Scraper
  module Modules
    module Video
      module HostNameMatching
        def =~( args )
          if args[:url]
            uri = URI.parse( args[:url] )

            if valid_host_name?( uri.host )
              return new( args )
            end
          end
        end

        def valid_host_name?( host_name )
          host_name.match(config[:valid_host_name])
        end
      end

      module Common
        def video_id
          @video_id
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cyx-scraper-0.4.0 lib/scraper/modules/video.rb
cyx-scraper-0.4.1 lib/scraper/modules/video.rb
cyx-scraper-0.4.2 lib/scraper/modules/video.rb
cyx-scraper-0.4.3 lib/scraper/modules/video.rb