Class: Aniview::Interface::TorrentItem
- Includes:
- Util
- Defined in:
- lib/aniview/interface/deluge/torrentitem.rb
Instance Attribute Summary
Attributes inherited from Item
Instance Method Summary collapse
- #attributes ⇒ Object
-
#initialize(name:, progress:, eta:, paused:, state:, id:) ⇒ TorrentItem
constructor
A new instance of TorrentItem.
Methods included from Util
decode_object, encode_object, error_message, format_duration, format_progress, format_size, mounted_filesystem?, parse_format, readline
Methods inherited from Item
Constructor Details
#initialize(name:, progress:, eta:, paused:, state:, id:) ⇒ TorrentItem
Returns a new instance of TorrentItem.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/aniview/interface/deluge/torrentitem.rb', line 8 def initialize(name:, progress:, eta:, paused:, state:, id:) @attr = { "n" => name, "p" => Util.format_progress(progress), "e" => Util.format_duration(eta), "u" => paused, "s" => state, "h" => id } end |
Instance Method Details
#attributes ⇒ Object
19 20 21 |
# File 'lib/aniview/interface/deluge/torrentitem.rb', line 19 def attributes return @attr end |