Class: Numeric

Inherits:
Object show all
Defined in:
lib/sixarm_ruby_to_id/numeric.rb

Overview

Cast a number to an id.

Instance Method Summary collapse

Instance Method Details

#to_i_idObject

Cast me to an int.

3.14.to_i_id
#=> 3


12
13
14
# File 'lib/sixarm_ruby_to_id/numeric.rb', line 12

def to_i_id
  to_i
end

#to_i_idsObject

Cast me to a list of int.

3.14.to_i_ids
#=> [3]


21
22
23
# File 'lib/sixarm_ruby_to_id/numeric.rb', line 21

def to_i_ids
  [to_i]
end