class Bitmapped::Cli
Public Class Methods
split_input(input)
click to toggle source
# File lib/bitmapped/cli.rb, line 23 def split_input(input) input.strip.split(' ') end
start()
click to toggle source
# File lib/bitmapped/cli.rb, line 8 def start begin bitmap = Bitmap.new puts "Bitmapped Command Centre (Ctrl+C to exit):" loop do input = split_input(Readline.readline("> ")) bitmap.command(input) end rescue Interrupt => interrupt puts "\nExiting..." exit end end