Class: WebConsole::REPL::IRB::FiberInputMethod
- Inherits:
-
IRB::StdioInputMethod
- Object
- IRB::StdioInputMethod
- WebConsole::REPL::IRB::FiberInputMethod
- 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
- #encoding ⇒ Object
- #gets ⇒ Object
-
#initialize ⇒ FiberInputMethod
constructor
A new instance of FiberInputMethod.
Constructor Details
#initialize ⇒ FiberInputMethod
Returns a new instance of FiberInputMethod.
16 |
# File 'lib/web_console/repl/irb.rb', line 16 def initialize; end |
Instance Method Details
#encoding ⇒ Object
22 23 24 |
# File 'lib/web_console/repl/irb.rb', line 22 def encoding (@previous || '').encoding end |
#gets ⇒ Object
18 19 20 |
# File 'lib/web_console/repl/irb.rb', line 18 def gets @previous = Fiber.yield end |