class Textbringer::Server

Public Instance Methods

eval(s) click to toggle source
# File lib/textbringer/commands/server.rb, line 34
def eval(s)
  with_redisplay do
    Controller.current.instance_eval(s).inspect
  end
end
visit_file(filename, wait: true) click to toggle source
# File lib/textbringer/commands/server.rb, line 40
def visit_file(filename, wait: true)
  queue = Queue.new if wait
  with_redisplay do
    find_file(filename)
    Buffer.current[:client_wait_queue] = queue if wait
  end
  queue.deq if wait
end

Private Instance Methods

with_redisplay() { || ... } click to toggle source
# File lib/textbringer/commands/server.rb, line 51
def with_redisplay
  foreground! do
    begin
      yield
    ensure
      Window.redisplay
    end
  end
end