Module: CultomePlayer::Command::Reader
- Included in:
- CultomePlayer::Command
- Defined in:
- lib/cultome_player/command/reader.rb
Instance Method Summary collapse
-
#command_reader ⇒ Readline
Lazy getter for readline object.
-
#read_command(prompt) ⇒ String
Display a prompt and read user input.
Instance Method Details
#command_reader ⇒ Readline
Lazy getter for readline object.
17 18 19 20 21 22 23 24 25 |
# File 'lib/cultome_player/command/reader.rb', line 17 def command_reader return Readline if @command_reader_initialized Readline.completion_append_character = "" Readline.basic_word_break_characters = Readline.basic_word_break_characters.delete("@") Readline.completion_proc = completion_proc @command_reader_initialized = true return Readline end |
#read_command(prompt) ⇒ String
Display a prompt and read user input.
10 11 12 |
# File 'lib/cultome_player/command/reader.rb', line 10 def read_command(prompt) command_reader.readline(prompt, true) end |