Class: Dooby::ReadlineHelper
- Inherits:
-
Object
- Object
- Dooby::ReadlineHelper
- Defined in:
- lib/dooby/readline_helper.rb
Instance Attribute Summary collapse
-
#completion_list ⇒ Object
Returns the value of attribute completion_list.
Instance Method Summary collapse
-
#initialize ⇒ ReadlineHelper
constructor
A new instance of ReadlineHelper.
Constructor Details
#initialize ⇒ ReadlineHelper
Returns a new instance of ReadlineHelper.
5 6 7 8 9 10 11 |
# File 'lib/dooby/readline_helper.rb', line 5 def initialize @completion_list = '' @completion_proc = proc { |s| @completion_list.grep( /^#{Regexp.escape(s)}/ ) } Readline.completion_append_character = " " Readline.completion_proc = @completion_proc end |
Instance Attribute Details
#completion_list ⇒ Object
Returns the value of attribute completion_list.
3 4 5 |
# File 'lib/dooby/readline_helper.rb', line 3 def completion_list @completion_list end |