Class: ParsingNesting::Tree::Term

Inherits:
Node show all
Defined in:
lib/parsing_nesting/tree.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#to_query

Constructor Details

#initialize(string) ⇒ Term

Returns a new instance of Term.



439
440
441
# File 'lib/parsing_nesting/tree.rb', line 439

def initialize(string)
  self.value = string
end

Instance Attribute Details

#valueObject

Returns the value of attribute value.



437
438
439
# File 'lib/parsing_nesting/tree.rb', line 437

def value
  @value
end

Instance Method Details

#can_embed?Boolean

Returns:

  • (Boolean)


443
444
445
# File 'lib/parsing_nesting/tree.rb', line 443

def can_embed?
  true
end

#negateObject



451
452
453
# File 'lib/parsing_nesting/tree.rb', line 451

def negate
  ExcludedClause.new(self)
end

#to_embedObject



447
448
449
# File 'lib/parsing_nesting/tree.rb', line 447

def to_embed
  value
end