Class: Runch::Language::C
- Inherits:
-
Object
- Object
- Runch::Language::C
- Includes:
- Base
- Defined in:
- lib/runch/language/c.rb
Instance Method Summary collapse
Methods included from Base
Instance Method Details
#compile(tmpdir) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/runch/language/c.rb', line 8 def compile(tmpdir) basename = File.basename(@main_source, ".*") filename = File.basename(@main_source) main_source = File.join(tmpdir, filename) executable = File.join(tmpdir, basename) system("gcc", "-o", executable, main_source) executable end |