Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Shoes-IRB made by ~devyn
- require 'irb'
- Shoes.app do
- background black
- @p = para '', :family => 'monospace', :color => white
- @sreader, @swriter = StringIO.new, StringIO.new
- Thread.start do
- @irb = IRB::Irb.new(nil, @sreader, @swriter)
- loop do
- @irb.eval_input
- end
- end
- animate(24) do
- c = @swriter.getc
- @p.text += c.chr if c
- end
- keypress do |k|
- if k.class == String
- @sreader.write k
- elsif (k == :enter) or (k == :return)
- @sreader.write "\n"
- end
- end
- end
Add Comment
Please, Sign In to add comment