Sha256: 202ff4a5cd65852ad9ebb77a11636b90869adc1425174e1a9bb8840f5093bfee
Contents?: true
Size: 490 Bytes
Versions: 4
Compression:
Stored size: 490 Bytes
Contents
#! /usr/bin/env ruby # coding: utf-8 require "pp" # # # class CalcRepeater #def initialize #end # 引数 calc は以下のメソッドを持っている必要がある。 def repeat(calc, io = STDOUT) while true io.puts "Calculation started: #{calc.name}." calc.calculate break unless calc.normal_ended? break unless calc.to_be_continued? calc.next io.puts "Next to #{calc.name}." end calc.teardown puts "Calculation got converged: #{calc.name}." end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
vasputils-0.0.3 | lib/vasputils/calcrepeater.rb |
vasputils-0.0.2 | lib/vasputils/calcrepeater.rb |
vasputils-0.0.1 | lib/vasputils/calcrepeater.rb |
vasputils-0.0.0 | lib/vasputils/calcrepeater.rb |