Sha256: 265a5fa63b2a215cde41afe5caed610ec9c4467c297a9d6cff86f3fe1412792e

Contents?: true

Size: 278 Bytes

Versions: 6

Compression:

Stored size: 278 Bytes

Contents

# -*- coding: utf-8 -*-

# Cast a number to an id.
#
class Numeric

  # Cast me to an int.
  #
  #     3.14.to_i_id
  #     #=> 3
  #
  def to_i_id
    to_i
  end

  # Cast me to a list of int.
  #
  #     3.14.to_i_ids
  #     #=> [3]
  #
  def to_i_ids
    [to_i]
  end


end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
sixarm_ruby_to_id-2.0.0 lib/sixarm_ruby_to_id/numeric.rb
sixarm_ruby_to_id-1.1.3 lib/sixarm_ruby_to_id/numeric.rb
sixarm_ruby_to_id-1.1.2 lib/sixarm_ruby_to_id/numeric.rb
sixarm_ruby_to_id-1.1.1 lib/sixarm_ruby_to_id/numeric.rb
sixarm_ruby_to_id-1.1.0 lib/sixarm_ruby_to_id/numeric.rb
sixarm_ruby_to_id-1.0.9 lib/sixarm_ruby_to_id/numeric.rb