daily pastebin goal
49%
SHARE
TWEET

Untitled

a guest Mar 8th, 2018 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def eval_input
  2.       @scanner.set_prompt do
  3.     |ltype, indent, continue, line_no|
  4.     if ltype
  5.       f = @context.prompt_s
  6.     elsif continue
  7.       f = @context.prompt_c
  8.     elsif indent > 0
  9.       f = @context.prompt_n
  10.     else @context.prompt_i
  11.       f = @context.prompt_i
  12.     end
  13.     f = "" unless f
  14.     if @context.prompting?
  15.       @context.io.prompt = p = prompt(f, ltype, indent, line_no)
  16.     else
  17.       @context.io.prompt = p = ""
  18.     end
  19.     if @context.auto_indent_mode
  20.       unless ltype
  21.             ind = prompt(@context.prompt_i, ltype, indent, line_no)[/.*\z/].size +
  22.           indent * 2 - p.size
  23.         ind += 2 if continue
  24.         @context.io.prompt = p + " " * ind if ind > 0
  25.       end
  26.     end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top