Sha256: b7f43421911fa7b58a613c8c231b5172c1ba24efbfc4167e0d3009fcd269fde7
Contents?: true
Size: 383 Bytes
Versions: 13
Compression:
Stored size: 383 Bytes
Contents
# dummy user model... just creates an object that responds to #id and # is equal to all other instances that have the the same id class User def initialize(id) @id = id end def ==(other) other && id == other.id end def eql?(other) self == other end def self.find(id) new(id) if id end def hash id.hash end def id @id.to_s end end
Version data entries
13 entries across 13 versions & 1 rubygems