Class: WebConsole::REPL::IRB::FiberInputMethod

Inherits:
IRB::StdioInputMethod
  • Object
show all
Defined in:
lib/web_console/repl/irb.rb

Overview

For some reason™ we have to be ::IRB::StdioInputMethod subclass to get #prompt populated.

Not a pretty OOP, but for now, we just have to deal with it.

Instance Method Summary collapse

Constructor Details

#initializeFiberInputMethod

Returns a new instance of FiberInputMethod.



16
# File 'lib/web_console/repl/irb.rb', line 16

def initialize; end

Instance Method Details

#encodingObject



22
23
24
# File 'lib/web_console/repl/irb.rb', line 22

def encoding
  (@previous || '').encoding
end

#getsObject



18
19
20
# File 'lib/web_console/repl/irb.rb', line 18

def gets
  @previous = Fiber.yield
end