Class: Numeric
Overview
Cast a number to an id.
Instance Method Summary collapse
-
#to_i_id ⇒ Object
Cast me to an int.
-
#to_i_ids ⇒ Object
Cast me to a list of int.
Instance Method Details
#to_i_id ⇒ Object
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_ids ⇒ Object
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 |