Class: Fenopy::Torrent

Inherits:
Object
  • Object
show all
Defined in:
lib/fenopy/torrent.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Torrent

Returns a new instance of Torrent.



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/fenopy/torrent.rb', line 5

def initialize(options)
	puts options.inspect
	self.name 		= options['name']
	self.size 		= options['size']
	self.page 		= options['page']
	self.url 			= options['torrent']
	self.magnet 	= options['magnet']
	self.hash 		= options['hash']
	self.category = options['category']
	self.seeders  = options['seeder']
	self.leechers = options['leecher']
end

Instance Attribute Details

#categoryObject

Returns the value of attribute category.



3
4
5
# File 'lib/fenopy/torrent.rb', line 3

def category
  @category
end

#hashObject

Returns the value of attribute hash.



3
4
5
# File 'lib/fenopy/torrent.rb', line 3

def hash
  @hash
end

#leechersObject

Returns the value of attribute leechers.



3
4
5
# File 'lib/fenopy/torrent.rb', line 3

def leechers
  @leechers
end

#magnetObject

Returns the value of attribute magnet.



3
4
5
# File 'lib/fenopy/torrent.rb', line 3

def magnet
  @magnet
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/fenopy/torrent.rb', line 3

def name
  @name
end

#pageObject

Returns the value of attribute page.



3
4
5
# File 'lib/fenopy/torrent.rb', line 3

def page
  @page
end

#seedersObject

Returns the value of attribute seeders.



3
4
5
# File 'lib/fenopy/torrent.rb', line 3

def seeders
  @seeders
end

#sizeObject

Returns the value of attribute size.



3
4
5
# File 'lib/fenopy/torrent.rb', line 3

def size
  @size
end

#urlObject

Returns the value of attribute url.



3
4
5
# File 'lib/fenopy/torrent.rb', line 3

def url
  @url
end