Class: Pkg_noisrev::MyThread::Stat
- Inherits:
-
Object
- Object
- Pkg_noisrev::MyThread::Stat
- Defined in:
- lib/pkg_noisrev/threads.rb
Instance Attribute Summary collapse
-
#failed ⇒ Object
Returns the value of attribute failed.
-
#nthread ⇒ Object
Returns the value of attribute nthread.
-
#ok ⇒ Object
Returns the value of attribute ok.
Instance Method Summary collapse
-
#initialize(n) ⇒ Stat
constructor
A new instance of Stat.
- #to_s ⇒ Object
Constructor Details
#initialize(n) ⇒ Stat
Returns a new instance of Stat.
79 80 81 82 83 |
# File 'lib/pkg_noisrev/threads.rb', line 79 def initialize(n) @nthread = n @ok = 0 @failed = 0 end |
Instance Attribute Details
#failed ⇒ Object
Returns the value of attribute failed.
77 78 79 |
# File 'lib/pkg_noisrev/threads.rb', line 77 def failed @failed end |
#nthread ⇒ Object
Returns the value of attribute nthread.
77 78 79 |
# File 'lib/pkg_noisrev/threads.rb', line 77 def nthread @nthread end |
#ok ⇒ Object
Returns the value of attribute ok.
77 78 79 |
# File 'lib/pkg_noisrev/threads.rb', line 77 def ok @ok end |
Instance Method Details
#to_s ⇒ Object
85 86 87 |
# File 'lib/pkg_noisrev/threads.rb', line 85 def to_s "%d (o/f): %d/%d" % [@nthread, @ok, @failed] end |