class MandatoryClause
Attributes
operand[RW]
Public Class Methods
new(v)
click to toggle source
# File lib/parsing_nesting/tree.rb, line 356 def initialize(v) self.operand = v end
Public Instance Methods
can_embed?()
click to toggle source
# File lib/parsing_nesting/tree.rb, line 360 def can_embed? # right now '+' clauses only apply to terms/phrases # which we can embed with a + in front. true end
negate()
click to toggle source
negating mandatory to excluded is decent semantics, although it's not strictly 'true', it's a choice.
# File lib/parsing_nesting/tree.rb, line 372 def negate ExcludedClause.new(operand) end
to_embed()
click to toggle source
# File lib/parsing_nesting/tree.rb, line 366 def to_embed '+' + operand.to_embed end