lib/rubo/brain.rb
# Get a User object given a unique identifier.
#
# @param id [Integer]
# @param options [Hash]
# @option options [String] :name (id)
# @option options [String] :room (nil)
# @return [User]
Get a User object given a unique identifier.
Get a User object given a unique identifier .
def user_for_id(id, options)
      user = users[id]
      if !user
        user = User.new(id, options)
        users[id] = user
      elsif options && options[:room] && (user[:room] == options[:room])
        user = User.new(id, options)
        users[id] = user
      end
      user
    end
def user_for_id ( id , options ) user = users [ id ] if ! user user = User . new ( id , options ) users [ id ] = user elsif options && options [ :room ] && ( user [ :room ] == options [ :room ] ) user = User . new ( id , options ) users [ id ] = user end user end
Get a User object given a unique identifier.
Get a User object given a unique identifier .
None
User
id
<not_specific>
options
None
<not_specific>
None