Sha256: 0eef614855f404f29ef4ca0d55bc7c62a27d77d23196f6ff788ef7e765ac2cf6

Contents?: true

Size: 271 Bytes

Versions: 2

Compression:

Stored size: 271 Bytes

Contents

require_relative 'response'

module Command
  class OnToken
    def execute(compass, location, tokens)
      Response.new(
        compass: compass,
        location: location,
        return_value: tokens.any?(location),
        tokens: tokens
      )
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
karel-interpreter-0.2.0 lib/karel/command/on_token.rb
karel-interpreter-0.1.0 lib/karel/command/on_token.rb