Method: Gloo::Exec::Script#run

Defined in:
lib/gloo/exec/script.rb

#runObject

Run the script. The script might be a single string or an array of lines.



26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/gloo/exec/script.rb', line 26

def run
  @engine.exec_env.push_script self

  if @obj.value.is_a? String
    @engine.parser.run @obj.value
  elsif @obj.value.is_a? Array
    @obj.value.each do |line|
      break if @break_out
      @engine.parser.run line
    end
  end

  @engine.exec_env.pop_script
end