class TTWatcher::Torrent

Attributes

added_date[R]

@return [String]

Returns date (as string) when torrent was added.
author[R]

@return [String]

Returns torrent creator.
description[R]

@return [String]

Returns torrent description.
download_url[R]

@return [String]

Returns direct url for torrent download.
leeches[R]

@return [String]

Returns leeches count.
magnet_url[R]

@return [String]

Returns magnet url to the torrent.
name[R]

@return [String]

Returns torrent name.
seeders[R]

@return [String]

Returns seeders count.
size[R]

@return [String]

Returns torrent size.
tracker[R]

@return [Symbol]

Returns tracker for the torrent.
url[R]

@return [String]

Returns url to an page with additional info about torrent.

Public Class Methods

new(params = {}) click to toggle source

Creates new Torrent instance.

@param [Hash] params @option params [String] :name @option params [String] :description @option params [String] :url. @option params [Symbol] :tracker @option params [String] :author @option params [String] :added_date @option params [Integer] :seeders @option params [Integer] :leeches @option params [String] :size @option params [String] :magnet_url @option params [String] :download_url

@return [Torrent]

# File sources/ttwatcher/torrent.rb, line 79
def initialize(params = {})
  %i(name description url tracker author added_date seeders
     leeches size magnet_url download_url).each do |word|

    instance_variable_set "@#{word}", params[word]
  end
end