Wrap around the input options, the current answer, and the current position.
Passed to handlers, which are expected to mutate answer and position as they handle incoming events.
# File lib/interact/interactive.rb, line 66 def back(x) return if x == 0 print("\b" * (x * char_size)) @position -= x end
# File lib/interact/interactive.rb, line 53 def censor(what) if with = @options[:echo] with * what.size else what end end
# File lib/interact/interactive.rb, line 74 def clear(x) return if x == 0 print(" " * (x * char_size)) @position += x back(x) end
# File lib/interact/interactive.rb, line 61 def display(what) print(censor(what)) @position += what.size end
Call to signal to the input reader that it can stop.
# File lib/interact/interactive.rb, line 44 def done! @done = true end
Generated with the Darkfish Rdoc Generator 2.