Class: HailHydra::Torrent
- Inherits:
-
Object
- Object
- HailHydra::Torrent
- Defined in:
- lib/torrent.rb
Instance Attribute Summary collapse
-
#leechers ⇒ Object
Returns the value of attribute leechers.
-
#magnet_link ⇒ Object
Returns the value of attribute magnet_link.
-
#name ⇒ Object
Returns the value of attribute name.
-
#seeders ⇒ Object
Returns the value of attribute seeders.
-
#size ⇒ Object
Returns the value of attribute size.
-
#uploaded_at ⇒ Object
Returns the value of attribute uploaded_at.
-
#uploaded_by ⇒ Object
Returns the value of attribute uploaded_by.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Torrent
constructor
A new instance of Torrent.
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
#leechers ⇒ Object
Returns the value of attribute leechers.
6 7 8 |
# File 'lib/torrent.rb', line 6 def leechers @leechers end |
#magnet_link ⇒ Object
Returns the value of attribute magnet_link.
9 10 11 |
# File 'lib/torrent.rb', line 9 def magnet_link @magnet_link end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/torrent.rb', line 3 def name @name end |
#seeders ⇒ Object
Returns the value of attribute seeders.
5 6 7 |
# File 'lib/torrent.rb', line 5 def seeders @seeders end |
#size ⇒ Object
Returns the value of attribute size.
10 11 12 |
# File 'lib/torrent.rb', line 10 def size @size end |
#uploaded_at ⇒ Object
Returns the value of attribute uploaded_at.
7 8 9 |
# File 'lib/torrent.rb', line 7 def uploaded_at @uploaded_at end |
#uploaded_by ⇒ Object
Returns the value of attribute uploaded_by.
8 9 10 |
# File 'lib/torrent.rb', line 8 def uploaded_by @uploaded_by end |
#url ⇒ Object
Returns the value of attribute url.
4 5 6 |
# File 'lib/torrent.rb', line 4 def url @url end |