Ruby: rb_arithmetic_sequence_components_t Struct Reference

Ruby 3.2.5p208 (2024-07-26 revision 31d0f1a2e7dbfb60731d1f05b868e1d578cda493)

Data Fields
rb_arithmetic_sequence_components_t Struct Reference

Decomposed `Enumerator::ArithmeicSequence`. More...

`#include <enumerator.h>`

## Data Fields
VALUE | begin
| "Left" or "lowest" endpoint of the sequence.
VALUE | end
| "Right" or "highest" endpoint of the sequence.
VALUE | step
| Step between a sequence.
int | exclude_end
| Whether the endpoint is open or closed.

## Detailed Description

Decomposed `Enumerator::ArithmeicSequence`.

This is a subclass of rb_cEnumerator, which represents a sequence of numbers with common difference. Internal data structure of the class is opaque to users, but you can obtain a decomposed one using rb_arithmetic_sequence_extract().

Definition at line 53 of file enumerator.h.

## Field Documentation

## ◆ begin

VALUE rb_arithmetic_sequence_components_t::begin

"Left" or "lowest" endpoint of the sequence.

Definition at line 54 of file enumerator.h.

Referenced by rb_arithmetic_sequence_beg_len_step(), and rb_arithmetic_sequence_extract().

## ◆ end

VALUE rb_arithmetic_sequence_components_t::end

"Right" or "highest" endpoint of the sequence.

Definition at line 55 of file enumerator.h.

Referenced by rb_arithmetic_sequence_beg_len_step(), and rb_arithmetic_sequence_extract().

## ◆ exclude_end

int rb_arithmetic_sequence_components_t::exclude_end

Whether the endpoint is open or closed.

Definition at line 57 of file enumerator.h.

Referenced by rb_arithmetic_sequence_beg_len_step(), and rb_arithmetic_sequence_extract().

## ◆ step

VALUE rb_arithmetic_sequence_components_t::step

Step between a sequence.

Definition at line 56 of file enumerator.h.

Referenced by rb_arithmetic_sequence_beg_len_step(), and rb_arithmetic_sequence_extract().

The documentation for this struct was generated from the following file:

- include/ruby/internal/intern/enumerator.h