class Array
Public Instance Methods
to_f()
click to toggle source
# File lib/core_ext/array.rb, line 7 def to_f map { |str| str.to_f } end
to_i()
click to toggle source
# File lib/core_ext/array.rb, line 3 def to_i map { |str| str.to_i } end
to_num()
click to toggle source
# File lib/core_ext/array.rb, line 11 def to_num begin to_i rescue begin to_f rescue raise "Unable to convert #{self} #to_num" end end end