Method: Atoyrobot::CLI.start
- Defined in:
- lib/atoyrobot/cli.rb
.start(_argv = [], args = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/atoyrobot/cli.rb', line 11 def start(_argv = [], args = {}) self.stdin = args[:input] || STDIN robot = Robot.new loop do raw_input = stdin.gets&.chomp || '' break if raw_input.empty? || raw_input == 'exit' execute(raw_input, robot) end end |