Class: Spinny::InteractiveClient
- Inherits:
-
Object
- Object
- Spinny::InteractiveClient
- Defined in:
- lib/spinny/interactive_client.rb
Overview
An simple REPL that will allow you to push code to run on a Spinny::Server
Instance Method Summary collapse
-
#initialize ⇒ InteractiveClient
constructor
A new instance of InteractiveClient.
- #start! ⇒ Object
Constructor Details
#initialize ⇒ InteractiveClient
Returns a new instance of InteractiveClient.
5 6 7 |
# File 'lib/spinny/interactive_client.rb', line 5 def initialize @connection = Server.connect end |
Instance Method Details
#start! ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/spinny/interactive_client.rb', line 9 def start! loop do puts "Type code to eval in fork then hit enter..." code = gets @connection.push(code) end end |