Sha256: 286aafa129c5e53b1a7af9797e02c8ee4f6bedefb79ab7cc41ea633755ec5ffb

Contents?: true

Size: 607 Bytes

Versions: 5

Compression:

Stored size: 607 Bytes

Contents

require_relative 'unary_input_expression'

module Zenlish
  module Inflect
    class NotEqualsLiteral < UnaryInputExpression
      attr_reader :literal

      def initialize(anArgument, aLiteral)
        super(anArgument)
        @literal = aLiteral
      end

      def success?(headings, lexeme, actuals)
        if actuals.empty?
          hd = headings[argument.index]
          feat_def = hd.evaluate_for(lexeme)
          !feat_def.domain.include?(literal)
        else
          val = actuals[argument.index]
          val != literal
        end
      end
    end # class
  end # module
end # module

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
zenlish-0.2.05 lib/zenlish/inflect/not_equals_literal.rb
zenlish-0.2.04 lib/zenlish/inflect/not_equals_literal.rb
zenlish-0.2.03 lib/zenlish/inflect/not_equals_literal.rb
zenlish-0.2.02 lib/zenlish/inflect/not_equals_literal.rb
zenlish-0.2.01 lib/zenlish/inflect/not_equals_literal.rb