Class: ParsingNesting::Tree::Phrase

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) ⇒ Phrase

Returns a new instance of Phrase.



407
408
409
# File 'lib/parsing_nesting/tree.rb', line 407

def initialize(string)
  self.value = string
end

Instance Attribute Details

#valueObject

Returns the value of attribute value.



405
406
407
# File 'lib/parsing_nesting/tree.rb', line 405

def value
  @value
end

Instance Method Details

#can_embed?Boolean

Returns:

  • (Boolean)


411
412
413
# File 'lib/parsing_nesting/tree.rb', line 411

def can_embed?
  true
end

#negateObject



419
420
421
# File 'lib/parsing_nesting/tree.rb', line 419

def negate
  ExcludedClause.new(self)
end

#to_embedObject



415
416
417
# File 'lib/parsing_nesting/tree.rb', line 415

def to_embed
  '"' + value + '"'
end