Class: NzbGetPP::Nzb
- Inherits:
-
Object
- Object
- NzbGetPP::Nzb
- Defined in:
- lib/nzbgetpp/nzb.rb
Constant Summary collapse
- COMPLETED =
{ "0" => false, "1" => true, }
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
Instance Method Summary collapse
- #completed=(nzbpp_nzbcompleted) ⇒ Object
- #completed? ⇒ Boolean
-
#initialize(filename, completed) ⇒ Nzb
constructor
A new instance of Nzb.
Constructor Details
#initialize(filename, completed) ⇒ Nzb
Returns a new instance of Nzb.
12 13 14 15 |
# File 'lib/nzbgetpp/nzb.rb', line 12 def initialize(filename, completed) @filename = filename self.completed = completed end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
9 10 11 |
# File 'lib/nzbgetpp/nzb.rb', line 9 def filename @filename end |
Instance Method Details
#completed=(nzbpp_nzbcompleted) ⇒ Object
18 19 20 |
# File 'lib/nzbgetpp/nzb.rb', line 18 def completed=(nzbpp_nzbcompleted) @completed = COMPLETED[nzbpp_nzbcompleted] end |
#completed? ⇒ Boolean
22 23 24 |
# File 'lib/nzbgetpp/nzb.rb', line 22 def completed? !!@completed end |