Class: GmailSearchSyntax::AST::Around

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(left, distance, right) ⇒ Around

Returns a new instance of Around.



101
102
103
104
105
# File 'lib/gmail_search_syntax/ast.rb', line 101

def initialize(left, distance, right)
  @left = left
  @distance = distance
  @right = right
end

Instance Attribute Details

#distanceObject (readonly)

Returns the value of attribute distance.



99
100
101
# File 'lib/gmail_search_syntax/ast.rb', line 99

def distance
  @distance
end

#leftObject (readonly)

Returns the value of attribute left.



99
100
101
# File 'lib/gmail_search_syntax/ast.rb', line 99

def left
  @left
end

#rightObject (readonly)

Returns the value of attribute right.



99
100
101
# File 'lib/gmail_search_syntax/ast.rb', line 99

def right
  @right
end

Instance Method Details

#inspectObject



107
108
109
# File 'lib/gmail_search_syntax/ast.rb', line 107

def inspect
  "#<Around #{@left.inspect} AROUND #{@distance} #{@right.inspect}>"
end