Class: ParsingNesting::Tree::MandatoryClause
- 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) ⇒ MandatoryClause
constructor
A new instance of MandatoryClause.
-
#negate ⇒ Object
negating mandatory to excluded is decent semantics, although it’s not strictly ‘true’, it’s a choice.
- #to_embed ⇒ Object
Methods inherited from Node
Constructor Details
#initialize(v) ⇒ MandatoryClause
Returns a new instance of MandatoryClause.
365 366 367 |
# File 'lib/parsing_nesting/tree.rb', line 365 def initialize(v) self.operand = v end |
Instance Attribute Details
#operand ⇒ Object
Returns the value of attribute operand.
364 365 366 |
# File 'lib/parsing_nesting/tree.rb', line 364 def operand @operand end |
Instance Method Details
#can_embed? ⇒ Boolean
369 370 371 372 373 |
# File 'lib/parsing_nesting/tree.rb', line 369 def #right now '+' clauses only apply to terms/phrases #which we can embed with a + in front. true end |
#negate ⇒ Object
negating mandatory to excluded is decent semantics, although it’s not strictly ‘true’, it’s a choice.
380 381 382 |
# File 'lib/parsing_nesting/tree.rb', line 380 def negate ExcludedClause.new( operand ) end |
#to_embed ⇒ Object
374 375 376 |
# File 'lib/parsing_nesting/tree.rb', line 374 def '+' + operand. end |