Class: HailHydra::Torrent

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ Torrent

Returns a new instance of Torrent.



12
13
14
15
16
17
18
19
20
21
# File 'lib/torrent.rb', line 12

def initialize(args={})
  self.name = args[:name]
  self.url = args[:url]
  self.seeders = args[:seeders]
  self.leechers = args[:leechers]
  self.uploaded_at = args[:uploaded_at]
  self.uploaded_by = args[:uploaded_by]
  self.size = args[:size]
  self.magnet_link = args[:magnet_link]
end

Instance Attribute Details

#leechersObject

Returns the value of attribute leechers.



6
7
8
# File 'lib/torrent.rb', line 6

def leechers
  @leechers
end

Returns the value of attribute magnet_link.



9
10
11
# File 'lib/torrent.rb', line 9

def magnet_link
  @magnet_link
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#seedersObject

Returns the value of attribute seeders.



5
6
7
# File 'lib/torrent.rb', line 5

def seeders
  @seeders
end

#sizeObject

Returns the value of attribute size.



10
11
12
# File 'lib/torrent.rb', line 10

def size
  @size
end

#uploaded_atObject

Returns the value of attribute uploaded_at.



7
8
9
# File 'lib/torrent.rb', line 7

def uploaded_at
  @uploaded_at
end

#uploaded_byObject

Returns the value of attribute uploaded_by.



8
9
10
# File 'lib/torrent.rb', line 8

def uploaded_by
  @uploaded_by
end

#urlObject

Returns the value of attribute url.



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

def url
  @url
end