Sha256: 264be626986ad926f649e6ae3e9c22f6ea75020a7f06f6957d9bd78990a7a6bb

Contents?: true

Size: 304 Bytes

Versions: 3

Compression:

Stored size: 304 Bytes

Contents

require_relative 'statement'

module Basic101

  class RestoreStatement < Statement

    def initialize(line_number)
      @line_number = line_number
    end

    def execute(runtime)
      runtime.restore(@line_number.to_i)
    end

    protected

    def state
      [@line_number]
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
basic101-0.4.0 lib/basic101/restore_statement.rb
basic101-0.2.0 lib/basic101/restore_statement.rb
basic101-0.1.0 lib/basic101/restore_statement.rb