Sha256: d3d66327a9a9c93531ed7d9a84205910b5ea94e64dfb2661267f042fcbc90e60
Contents?: true
Size: 603 Bytes
Versions: 5
Compression:
Stored size: 603 Bytes
Contents
require_relative 'unary_input_expression' module Zenlish module Inflect class EqualsLiteral < 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