Class: Nmax::Base
- Inherits:
-
Object
- Object
- Nmax::Base
- Defined in:
- lib/nmax/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
Instance Method Summary collapse
-
#initialize(count) ⇒ Base
constructor
A new instance of Base.
- #perform(_) ⇒ Object
Constructor Details
#initialize(count) ⇒ Base
Returns a new instance of Base.
5 6 7 |
# File 'lib/nmax/base.rb', line 5 def initialize(count) @count = count end |
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count.
3 4 5 |
# File 'lib/nmax/base.rb', line 3 def count @count end |
Instance Method Details
#perform(_) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/nmax/base.rb', line 9 def perform(_) yield rescue Exception => ex raise ex if SystemExit === ex $stderr.print "#{ex.class}: " if ex.class != RuntimeError $stderr.puts ex. end |