class Bytewise::Ast::Operators::Equals

Public Class Methods

new(negated: false) click to toggle source
# File lib/brace_markup/ast/operators/equals.rb, line 4
def initialize(negated: false)
  @negated = negated
end

Public Instance Methods

evaluate(first, second) click to toggle source
# File lib/brace_markup/ast/operators/equals.rb, line 8
def evaluate(first, second)
  if @negated
    first != second
  else
    first == second
  end
end