Class: Aqueductron::CountingEndPiece
- Inherits:
-
Object
- Object
- Aqueductron::CountingEndPiece
- Includes:
- PieceCommon
- Defined in:
- lib/aqueductron/counting_end_piece.rb
Instance Method Summary collapse
- #eof ⇒ Object
-
#initialize(so_far = 0) ⇒ CountingEndPiece
constructor
A new instance of CountingEndPiece.
- #receive(msg) ⇒ Object
Methods included from PieceCommon
Constructor Details
#initialize(so_far = 0) ⇒ CountingEndPiece
6 7 8 |
# File 'lib/aqueductron/counting_end_piece.rb', line 6 def initialize(so_far = 0) @so_far = so_far end |
Instance Method Details
#eof ⇒ Object
9 10 11 |
# File 'lib/aqueductron/counting_end_piece.rb', line 9 def eof SimpleResult.new(@so_far) end |
#receive(msg) ⇒ Object
12 13 14 |
# File 'lib/aqueductron/counting_end_piece.rb', line 12 def receive msg CountingEndPiece.new(@so_far + 1) end |