Class: ParsingNesting::Tree::ExcludedClause
- Defined in:
- lib/parsing_nesting/tree.rb
Instance Attribute Summary collapse
-
#operand ⇒ Object
Returns the value of attribute operand.
Instance Method Summary collapse
- #can_embed? ⇒ Boolean
-
#initialize(v) ⇒ ExcludedClause
constructor
A new instance of ExcludedClause.
-
#negate ⇒ Object
negating excluded to mandatory is a pretty decent choice.
- #simple_pure_negative? ⇒ Boolean
- #to_embed ⇒ Object
Methods inherited from Node
Constructor Details
#initialize(v) ⇒ ExcludedClause
Returns a new instance of ExcludedClause.
380 381 382 |
# File 'lib/parsing_nesting/tree.rb', line 380 def initialize(v) self.operand = v end |
Instance Attribute Details
#operand ⇒ Object
Returns the value of attribute operand.
378 379 380 |
# File 'lib/parsing_nesting/tree.rb', line 378 def operand @operand end |
Instance Method Details
#can_embed? ⇒ Boolean
384 385 386 387 388 |
# File 'lib/parsing_nesting/tree.rb', line 384 def # right now '-' clauses only apply to terms/phrases, which # we can embed with a '-' in front. true end |
#negate ⇒ Object
negating excluded to mandatory is a pretty decent choice
395 396 397 |
# File 'lib/parsing_nesting/tree.rb', line 395 def negate MandatoryClause.new(operand) end |
#simple_pure_negative? ⇒ Boolean
399 400 401 |
# File 'lib/parsing_nesting/tree.rb', line 399 def simple_pure_negative? true end |
#to_embed ⇒ Object
390 391 392 |
# File 'lib/parsing_nesting/tree.rb', line 390 def '-' + operand. end |