class TTWatcher::Parsers::Base

Attributes

assigned_site[R]

@return [Site]

settings[R]

@return [Hash]

Public Class Methods

new(site) click to toggle source

Creates Parser instance.

@param [Site] site

@return [Base]

# File sources/ttwatcher/sites/parsers/abstract_parser.rb, line 33
def initialize(site)
  @assigned_site = site
  @settings = S[site.name][:parser_settings] || {}
end

Public Instance Methods

parse(page) click to toggle source

@param [String] page

Url to initial page for parsing.

@return [TorrentList, NilClass]

TorrentList instance with torrents.
When parser crashed due to unknown reason it returns +nil+.
# File sources/ttwatcher/sites/parsers/abstract_parser.rb, line 14
def parse(page)
  raise NotImplementedError, "Abstract method called!"
end