class Command::Program
Public Class Methods
new()
click to toggle source
# File lib/karel/command/program.rb, line 5 def initialize @statements = [] end
Public Instance Methods
add_statement(statement)
click to toggle source
# File lib/karel/command/program.rb, line 9 def add_statement(statement) @statements << statement end
execute(compass, location, tokens)
click to toggle source
# File lib/karel/command/program.rb, line 13 def execute(compass, location, tokens) Batch.new(@statements).execute(compass, location, tokens) end