Class: Trajectory::User

Inherits:
Object
  • Object
show all
Includes:
Virtus
Defined in:
lib/trajectory/domain/user.rb

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ true, false

Returns true if two users are the sames i.e they share the same id attribute

Parameters:

  • other (User)

    the other object to compare

Returns:

  • (true, false)


24
25
26
# File 'lib/trajectory/domain/user.rb', line 24

def ==(other)
  id == other.id
end

#created_atDateTime

Returns the creation date of the user account.

Returns:

  • (DateTime)

    the creation date of the user account



11
# File 'lib/trajectory/domain/user.rb', line 11

attribute :created_at, DateTime

#emailString

Returns the email of the user.

Returns:

  • (String)

    the email of the user



17
# File 'lib/trajectory/domain/user.rb', line 17

attribute :email, String

#gravatar_urlString

Returns the url to the avatar image of the user (uses gravatar).

Returns:

  • (String)

    the url to the avatar image of the user (uses gravatar)



15
# File 'lib/trajectory/domain/user.rb', line 15

attribute :gravatar_url, String

#idInteger

Returns the unique identifier of the User.

Returns:

  • (Integer)

    the unique identifier of the User

Raises:



7
# File 'lib/trajectory/domain/user.rb', line 7

attribute :id, Integer, default: lambda { |project, attribute| raise MissingAttributeError.new(project, :id) }

#nameString

Returns the full name of the user.

Returns:

  • (String)

    the full name of the user



9
# File 'lib/trajectory/domain/user.rb', line 9

attribute :name, String

#updated_atDateTime

Returns the last modification date of the user account.

Returns:

  • (DateTime)

    the last modification date of the user account



13
# File 'lib/trajectory/domain/user.rb', line 13

attribute :updated_at, DateTime