class Object

Cast an object to an id.

Public Instance Methods

to_i_id() click to toggle source

Cast me to an int id.

Object.new.to_i_ids
#=> 70186724200120

Call object_id.to_i on the object; this is a decent default. Subclasses will override this, e.g. String, Array, Numeric, etc.

# File lib/sixarm_ruby_to_id/object.rb, line 14
def to_i_id
  object_id.to_i
end
to_i_ids() click to toggle source

Cast me to a list of int ids.

Object.new.to_i_ids
#=> [70186724200120]

Call object_id.to_i on the object; this is a decent default. Subclasses will override this, e.g. String, Array, Numeric, etc.

# File lib/sixarm_ruby_to_id/object.rb, line 26
def to_i_ids
  [self.to_i_id]
end