Class: Tcl::Interp

Inherits:
Object
  • Object
show all
Defined in:
lib/tcl.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeInterp

Returns a new instance of Interp.



5
6
7
# File 'lib/tcl.rb', line 5

def initialize
  @interp = Irule::TclInterp.new
end

Class Method Details

.load_from_file(file) ⇒ Object



13
14
15
16
17
# File 'lib/tcl.rb', line 13

def self.load_from_file(file)
  interp = Interp.new
  interp.eval IO.read(file)
  interp
end

Instance Method Details

#eval(text) ⇒ Object



9
10
11
# File 'lib/tcl.rb', line 9

def eval(text)
  @interp.eval text
end