Class: CTioga2::Ruby
- Inherits:
-
Object
- Object
- CTioga2::Ruby
- Defined in:
- lib/ctioga2/ruby.rb
Overview
The class in charge of the interaction with Ruby code
Defined Under Namespace
Classes: MetaModule
Class Method Summary collapse
Class Method Details
.compute_formula(col, vals, mods = []) ⇒ Object
44 45 46 |
# File 'lib/ctioga2/ruby.rb', line 44 def self.compute_formula(col, vals, mods = []) return Dobjects::Dvector.compute_formula(col, vals, [@module] + mods) end |
.run_code(str) ⇒ Object
34 35 36 |
# File 'lib/ctioga2/ruby.rb', line 34 def self.run_code(str) @module.send(:module_eval,str) end |
.run_file(file) ⇒ Object
38 39 40 41 42 |
# File 'lib/ctioga2/ruby.rb', line 38 def self.run_file(file) File.open(file) do |f| run_code(f.read) end end |