module WeebSh::IDObject
Mixin for objects with IDs
Attributes
hash[R]
@return [String] the ID which uniquely identifies this object in toph.
id[R]
@return [String] the ID which uniquely identifies this object in toph.
resolve_id[R]
@return [String] the ID which uniquely identifies this object in toph.
Public Instance Methods
==(other)
click to toggle source
ID based comparison
# File lib/weeb/data.rb, line 13 def ==(other) other.respond_to?(:resolve_id) ? (@id.resolve_id == other.resolve_id) : (@id == other) end