Class: Sabnzbd::Slot
- Inherits:
-
Object
- Object
- Sabnzbd::Slot
- Defined in:
- lib/sabnzbd/slot.rb
Instance Attribute Summary collapse
-
#average_age ⇒ Object
Returns the value of attribute average_age.
-
#category ⇒ Object
Returns the value of attribute category.
-
#eta ⇒ Object
Returns the value of attribute eta.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#files_missing ⇒ Object
Returns the value of attribute files_missing.
-
#mb ⇒ Object
Returns the value of attribute mb.
-
#mb_left ⇒ Object
Returns the value of attribute mb_left.
-
#msgid ⇒ Object
Returns the value of attribute msgid.
-
#nzo_id ⇒ Object
Returns the value of attribute nzo_id.
-
#percentage_completed ⇒ Object
Returns the value of attribute percentage_completed.
-
#position ⇒ Object
Returns the value of attribute position.
-
#priority ⇒ Object
Returns the value of attribute priority.
-
#size ⇒ Object
Returns the value of attribute size.
-
#size_left ⇒ Object
Returns the value of attribute size_left.
-
#status ⇒ Object
Returns the value of attribute status.
-
#time_left ⇒ Object
Returns the value of attribute time_left.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Slot
constructor
A new instance of Slot.
Constructor Details
#initialize(args = {}) ⇒ Slot
Returns a new instance of Slot.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/sabnzbd/slot.rb', line 7 def initialize(args={}) @filename = args["filename"] || "No filename" @average_age = args["avg_age"] || "-" @status = args["status"] || "No status" @category = args["cat"] || "-" @files_missing = args["missing"] || 0 @position = args["index"] || 0 @priority = args["priority"] || "-" @percentage_completed = args["percentage"] || @time_left = args["timeleft"] || Time.now @eta = args["eta"] || "-" @size = args["size"] || "-" @size_left = args["sizeleft"] || "-" @mb = args["mb"] || 0.00 @mb_left = args["mbleft"] || 0.00 @msgid = args["msgid"] || nil @nzo_id = args["nzo_id"] || "-" end |
Instance Attribute Details
#average_age ⇒ Object
Returns the value of attribute average_age.
3 4 5 |
# File 'lib/sabnzbd/slot.rb', line 3 def average_age @average_age end |
#category ⇒ Object
Returns the value of attribute category.
3 4 5 |
# File 'lib/sabnzbd/slot.rb', line 3 def category @category end |
#eta ⇒ Object
Returns the value of attribute eta.
3 4 5 |
# File 'lib/sabnzbd/slot.rb', line 3 def eta @eta end |
#filename ⇒ Object
Returns the value of attribute filename.
3 4 5 |
# File 'lib/sabnzbd/slot.rb', line 3 def filename @filename end |
#files_missing ⇒ Object
Returns the value of attribute files_missing.
3 4 5 |
# File 'lib/sabnzbd/slot.rb', line 3 def files_missing @files_missing end |
#mb ⇒ Object
Returns the value of attribute mb.
3 4 5 |
# File 'lib/sabnzbd/slot.rb', line 3 def mb @mb end |
#mb_left ⇒ Object
Returns the value of attribute mb_left.
3 4 5 |
# File 'lib/sabnzbd/slot.rb', line 3 def mb_left @mb_left end |
#msgid ⇒ Object
Returns the value of attribute msgid.
3 4 5 |
# File 'lib/sabnzbd/slot.rb', line 3 def msgid @msgid end |
#nzo_id ⇒ Object
Returns the value of attribute nzo_id.
3 4 5 |
# File 'lib/sabnzbd/slot.rb', line 3 def nzo_id @nzo_id end |
#percentage_completed ⇒ Object
Returns the value of attribute percentage_completed.
3 4 5 |
# File 'lib/sabnzbd/slot.rb', line 3 def percentage_completed @percentage_completed end |
#position ⇒ Object
Returns the value of attribute position.
3 4 5 |
# File 'lib/sabnzbd/slot.rb', line 3 def position @position end |
#priority ⇒ Object
Returns the value of attribute priority.
3 4 5 |
# File 'lib/sabnzbd/slot.rb', line 3 def priority @priority end |
#size ⇒ Object
Returns the value of attribute size.
3 4 5 |
# File 'lib/sabnzbd/slot.rb', line 3 def size @size end |
#size_left ⇒ Object
Returns the value of attribute size_left.
3 4 5 |
# File 'lib/sabnzbd/slot.rb', line 3 def size_left @size_left end |
#status ⇒ Object
Returns the value of attribute status.
3 4 5 |
# File 'lib/sabnzbd/slot.rb', line 3 def status @status end |
#time_left ⇒ Object
Returns the value of attribute time_left.
3 4 5 |
# File 'lib/sabnzbd/slot.rb', line 3 def time_left @time_left end |