Class: RubyCode

Inherits:
Code
  • Object
show all
Defined in:
lib/atk/yaml_info_parser.rb

Overview

Ruby Code/Evaluation

Instance Method Summary collapse

Methods inherited from Code

#init_with, tags, #to_s

Instance Method Details

#run(*args) ⇒ Object



40
41
42
43
44
45
# File 'lib/atk/yaml_info_parser.rb', line 40

def run(*args)
    temp_file = ".info_language_runner_cache.rb"
    IO.write(temp_file, @value)
    Process.wait(Process.spawn("ruby", temp_file, *args))
    File.delete(temp_file)
end