Class: Pkg_noisrev::MyThread::Stat

Inherits:
Object
  • Object
show all
Defined in:
lib/pkg_noisrev/threads.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#failedObject

Returns the value of attribute failed.



77
78
79
# File 'lib/pkg_noisrev/threads.rb', line 77

def failed
  @failed
end

#nthreadObject

Returns the value of attribute nthread.



77
78
79
# File 'lib/pkg_noisrev/threads.rb', line 77

def nthread
  @nthread
end

#okObject

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_sObject



85
86
87
# File 'lib/pkg_noisrev/threads.rb', line 85

def to_s
  "%d (o/f): %d/%d" % [@nthread, @ok, @failed]
end