Class: Range

Inherits:
Object show all
Defined in:
docs/multiarray/lib/multiarray.rb

Overview

Range is extended with a few methods

Instance Method Summary collapse

Instance Method Details

#sizeInteger

Compute the size of a range

Returns:

  • (Integer)

    Number of discrete values within range.



562
563
564
# File 'docs/multiarray/lib/multiarray.rb', line 562

def size
  max + 1 - min
end