class GameOfLife::Runner
Public Class Methods
new(arguments, stdin, stdout)
click to toggle source
# File lib/gameoflife/runner.rb, line 5 def initialize(arguments, stdin, stdout) @arguments = arguments @game = Game.new end
Public Instance Methods
run()
click to toggle source
# File lib/gameoflife/runner.rb, line 10 def run parse_options @game.run end
Private Instance Methods
parse_options()
click to toggle source
# File lib/gameoflife/runner.rb, line 17 def parse_options options = OptionParser.new options.banner = "Usage: gameoflife [options]" options.on('-h', '--help', "Show this message") { puts(options); exit } options.parse!(@arguments) end