Ruby Hello World
Zur Navigation springen
Zur Suche springen
Install
- apt-get install ruby2.3-tcltk
Sourcecode
- cat helloworld
require 'tk'
root = TkRoot.new { title "Hello, World!" }
TkLabel.new(root) do
text 'Hello, World!'
pack { padx 15 ; pady 15; side 'left' }
end
Tk.mainloop
Run
- ruby helloworld