Class: Mailmate::AST::CompareNode Private

Inherits:
Struct
  • Object
show all
Defined in:
lib/mailmate/ast.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

path: array of strings, e.g. [“from”, “name”] or [“#any-address”] op: one of “=”, “!=”, “~”, “!~”, “<”, “<=”, “>”, “>=” flags: array of single-letter strings, e.g. [“c”], [“c”, “a”], or [] value: a *Node (LiteralStringNode, NumberNode, RelativeDateNode, AbsoluteDateNode, VarRefNode)

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#flagsObject

Returns the value of attribute flags

Returns:

  • (Object)

    the current value of flags



17
18
19
# File 'lib/mailmate/ast.rb', line 17

def flags
  @flags
end

#opObject

Returns the value of attribute op

Returns:

  • (Object)

    the current value of op



17
18
19
# File 'lib/mailmate/ast.rb', line 17

def op
  @op
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



17
18
19
# File 'lib/mailmate/ast.rb', line 17

def path
  @path
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



17
18
19
# File 'lib/mailmate/ast.rb', line 17

def value
  @value
end

Instance Method Details

#inspectObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



18
# File 'lib/mailmate/ast.rb', line 18

def inspect; "Compare(#{path.join(".")} #{op}#{flags.empty? ? "" : "[#{flags.join}]"} #{value.inspect})"; end