File: helloworld_example.rb

package info (click to toggle)
ruby-inline 3.12.4-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 400 kB
  • ctags: 504
  • sloc: ruby: 1,504; makefile: 2
file content (12 lines) | stat: -rwxr-xr-x 185 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/ruby -w

require 'inline'

class Hello
  inline do |builder|
    builder.include "<stdio.h>"
    builder.c 'void hello() { puts("hello world"); }'
  end
end

Hello.new.hello