Class: Range

Inherits:
Object show all
Defined in:
lib/cosmos/core_ext/range.rb

Overview

COSMOS specific additions to the Ruby Range class

Instance Method Summary collapse

Instance Method Details

#to_a_to_fArray<Float>

Returns Array of each value within the Range converted to Float.

Returns:

  • (Array<Float>)

    Array of each value within the Range converted to Float



15
16
17
18
19
20
21
# File 'lib/cosmos/core_ext/range.rb', line 15

def to_a_to_f
  array = []
  self.each do |value|
    array << value.to_f
  end
  array
end