Sha256: 9b7f5a2c822476653cbcffd353e1bd93d4bcb9b59a6d84dc23dc870ebb36f4f5

Contents?: true

Size: 300 Bytes

Versions: 3

Compression:

Stored size: 300 Bytes

Contents

class Arity1Operators < Operator

  attr_reader :operand
  ARITY = 1

  def ==(other)
    other.class == self.class && other.operand == @operand
  end

  def initialize(operand)
    @operand = (operand.is_a?(Operator)) ? operand : ValueExpression.new(operand)
  end

  alias_method :equal?, :==

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lamep-0.2.1 lib/lamep/Expressions/arity1_operators.rb
lamep-0.2 lib/lamep/Expressions/arity1_operators.rb
lamep-0.1 lib/lamep/Expressions/arity1_operators.rb