Module: Spix::FeedDiscovery

Extended by:
FeedDiscovery
Included in:
FeedDiscovery
Defined in:
lib/spix_parser/tools/discovery.rb,
lib/spix_parser/tools/feed_discovery.rb,
lib/spix_parser/tools/feed_discovery/base.rb,
lib/spix_parser/tools/feed_discovery/feed.rb,
lib/spix_parser/tools/feed_discovery/document.rb

Defined Under Namespace

Classes: Base, Document, Feed

Instance Method Summary collapse

Instance Method Details

#feed?(uri) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/spix_parser/tools/feed_discovery.rb', line 10

def feed? uri
  Spix::Parser.parse(uri, :mode => :fetch) ? true : false
end

#list(uri, &block) ⇒ Object



14
15
16
17
# File 'lib/spix_parser/tools/feed_discovery.rb', line 14

def list uri, &block
  page = Base.new uri
  page.list &block
end

#list_uris_finded_in(uri) ⇒ Object



19
20
21
22
# File 'lib/spix_parser/tools/feed_discovery.rb', line 19

def list_uris_finded_in uri
  page = Base.new uri
  page.list_uris
end