Sha256: b20e80478e8515115b6ed91aac597aef6ffef9ce2ecd10a0f553f3f547c04f45

Contents?: true

Size: 291 Bytes

Versions: 3

Compression:

Stored size: 291 Bytes

Contents

# frozen_string_literal: true

module Basic101

  class NegateOperation

    include Identity

    def initialize(expression)
      @expression = expression
    end

    def eval(runtime)
      @expression.eval(runtime).negate
    end

    protected

    attr_reader :expression

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
basic101-1.0.2 lib/basic101/negate_operation.rb
basic101-1.0.1 lib/basic101/negate_operation.rb
basic101-1.0.0 lib/basic101/negate_operation.rb