File: helloworld_example.rb

package info (click to toggle)
libinline-ruby 3.6.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 156 kB
  • ctags: 130
  • sloc: ruby: 1,197; makefile: 3
file content (12 lines) | stat: -rw-r--r-- 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