Class: Sabnzbd::Slot

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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_ageObject

Returns the value of attribute average_age.



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

def average_age
  @average_age
end

#categoryObject

Returns the value of attribute category.



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

def category
  @category
end

#etaObject

Returns the value of attribute eta.



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

def eta
  @eta
end

#filenameObject

Returns the value of attribute filename.



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

def filename
  @filename
end

#files_missingObject

Returns the value of attribute files_missing.



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

def files_missing
  @files_missing
end

#mbObject

Returns the value of attribute mb.



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

def mb
  @mb
end

#mb_leftObject

Returns the value of attribute mb_left.



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

def mb_left
  @mb_left
end

#msgidObject

Returns the value of attribute msgid.



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

def msgid
  @msgid
end

#nzo_idObject

Returns the value of attribute nzo_id.



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

def nzo_id
  @nzo_id
end

#percentage_completedObject

Returns the value of attribute percentage_completed.



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

def percentage_completed
  @percentage_completed
end

#positionObject

Returns the value of attribute position.



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

def position
  @position
end

#priorityObject

Returns the value of attribute priority.



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

def priority
  @priority
end

#sizeObject

Returns the value of attribute size.



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

def size
  @size
end

#size_leftObject

Returns the value of attribute size_left.



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

def size_left
  @size_left
end

#statusObject

Returns the value of attribute status.



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

def status
  @status
end

#time_leftObject

Returns the value of attribute time_left.



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

def time_left
  @time_left
end