Class: GmailSearchSyntax::AST::Or

Inherits:
Node
  • Object
show all
Defined in:
lib/gmail_search_syntax/ast.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#==, #attributes

Constructor Details

#initialize(operands) ⇒ Or

Returns a new instance of Or.



65
66
67
# File 'lib/gmail_search_syntax/ast.rb', line 65

def initialize(operands)
  @operands = operands
end

Instance Attribute Details

#operandsObject (readonly)

Returns the value of attribute operands.



63
64
65
# File 'lib/gmail_search_syntax/ast.rb', line 63

def operands
  @operands
end

Instance Method Details

#inspectObject



69
70
71
# File 'lib/gmail_search_syntax/ast.rb', line 69

def inspect
  "#<Or #{@operands.map(&:inspect).join(" OR ")}>"
end