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

Version Path
hyper-operation-0.5.12 examples/five-letter-word-game/app/hyperloop/models/user.rb
hyper-operation-0.5.11 examples/five-letter-word-game/app/hyperloop/models/user.rb
hyper-operation-0.5.10 examples/five-letter-word-game/app/hyperloop/models/user.rb
hyper-operation-0.5.9 examples/five-letter-word-game/app/hyperloop/models/user.rb
hyper-operation-0.5.8 examples/five-letter-word-game/app/hyperloop/models/user.rb
hyper-operation-0.5.7 examples/five-letter-word-game/app/hyperloop/models/user.rb
hyper-operation-0.5.6 examples/five-letter-word-game/app/hyperloop/models/user.rb
hyper-operation-0.5.5 examples/five-letter-word-game/app/hyperloop/models/user.rb
hyper-operation-0.5.4 examples/five-letter-word-game/app/hyperloop/models/user.rb
hyper-operation-0.5.3 examples/five-letter-word-game/app/hyperloop/models/user.rb
hyper-operation-0.5.2 examples/five-letter-word-game/app/hyperloop/models/user.rb
hyper-operation-0.5.1 examples/five-letter-word-game/app/hyperloop/models/user.rb
hyper-operation-0.5.0 examples/five-letter-word-game/app/hyperloop/models/user.rb