Class: GmailSearchSyntax::AST::And

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

Returns a new instance of And.



53
54
55
# File 'lib/gmail_search_syntax/ast.rb', line 53

def initialize(operands)
  @operands = operands
end

Instance Attribute Details

#operandsObject (readonly)

Returns the value of attribute operands.



51
52
53
# File 'lib/gmail_search_syntax/ast.rb', line 51

def operands
  @operands
end

Instance Method Details

#inspectObject



57
58
59
# File 'lib/gmail_search_syntax/ast.rb', line 57

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