Class: Lobster::Profile

Inherits:
Object
  • Object
show all
Defined in:
lib/lobster/profile.rb

Overview

Information about a user that may or may not be connected to the server.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id) ⇒ Profile

Creates the user profile.


52
53
54
55
56
# File 'lib/lobster/profile.rb', line 52

def initialize(id)
  fail ArgumentError unless id.is_a?(Uuid)

  @id = id
end

Instance Attribute Details

#aliasString

Publicly displayed username. This is the name displayed to all other users and can differ from the login name.


18
# File 'lib/lobster/profile.rb', line 18

attr_type_accessor :alias, String

#avatar_idUuid

ID of the resource representing the user's avatar image.


43
# File 'lib/lobster/profile.rb', line 43

attr_type_accessor :avatar_id, Uuid

#coinsFixnum

Number of coins the user has accumulated in their pocketses.


48
# File 'lib/lobster/profile.rb', line 48

attr_type_accessor :coins, Fixnum

#colorFixnum

Color used to display the alias.


23
# File 'lib/lobster/profile.rb', line 23

attr_type_accessor :color, Fixnum

#idUuid (readonly)

Unique ID of the user the profile is about.


12
13
14
# File 'lib/lobster/profile.rb', line 12

def id
  @id
end

#loginTime

Date and time when the user last logged in.


33
# File 'lib/lobster/profile.rb', line 33

attr_type_accessor :login, Time

#quoteString

Custom message displayed with the user's profile.


38
# File 'lib/lobster/profile.rb', line 38

attr_type_accessor :quote, String

#registrationTime?

Date and time the user registered.


28
# File 'lib/lobster/profile.rb', line 28

attr_type_accessor :registration, Time