Set Elements Operands

The set elements operand is a relatively uncommon type of operand created by using the #elements property of set operands. It is used to place constraints on all elements of a set.

Examples of Set Elements Operands

All set elements operands are created by using SetOperand#elements property.

# Creates a set elements operand from set_operand.
set_elements_operand = set_operand.elements

Constraints

Generated from SetElementsConstraintReceiver.

==

==(operand, options = {})

Constrains the set elements to equal operand (either a constant integer or an integer operand).

Examples
# The elements of +set+ must equal +int+
set.elements.must == int

# The elements of +set+ must equal 17
set.elements.must == 17

>

>(operand, options = {})

Constrains the set elements to be strictly greater than operand (either a constant integer or an integer operand).

Examples
# The elements of +set+ must be strictly greater than +int+
set.elements.must > int

# The elements of +set+ must be strictly greater than 17
set.elements.must > 17

>=

>=(operand, options = {})

Constrains the set elements to be greater than or equal to operand (either a constant integer or an integer operand).

Examples
# The elements of +set+ must be greater than or equal to +int+
set.elements.must >= int

# The elements of +set+ must be greater than or equal to 17
set.elements.must >= 17

<

<(operand, options = {})

Constrains the set elements to be strictly less than operand (either a constant integer or an integer operand).

Examples
# The elements of +set+ must be strictly less than +int+
set.elements.must < int

# The elements of +set+ must be strictly less than 17
set.elements.must < 17

<=

<=(operand, options = {})

Constrains the set elements to be less than or equal to operand (either a constant integer or an integer operand).

Examples
# The elements of +set+ must be less than or equal to +int+
set.elements.must <= int

# The elements of +set+ must be less than or equal to 17
set.elements.must <= 17

Properties

None.