Class: NexusMods::Api::User
- Defined in:
- lib/nexus_mods/api/user.rb
Overview
A user on NExusMods. Mainly used for uploaders information.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Equality operator.
-
#initialize(nexus_mods:, member_id:, member_group_id:, name:, profile_url:) ⇒ User
constructor
Constructor.
Constructor Details
#initialize(nexus_mods:, member_id:, member_group_id:, name:, profile_url:) ⇒ User
Constructor
- Parameters
-
nexus_mods (NexusMods): The NexusMods API instance that the resource can use to query for other resources
-
member_id (Integer): The user’s member id
-
member_group_id (Integer): The user’s member group id
-
name (String): The user’s name
-
profile_url (String): The user’s profile URL
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/nexus_mods/api/user.rb', line 28 def initialize( nexus_mods:, member_id:, member_group_id:, name:, profile_url: ) super(nexus_mods:) @member_id = member_id @member_group_id = member_group_id @name = name @profile_url = profile_url end |
Instance Method Details
#==(other) ⇒ Object
Equality operator
- Parameters
-
other (Object): Other object to compare with
- Result
-
Boolean: Are objects equal?
48 49 50 51 52 53 54 |
# File 'lib/nexus_mods/api/user.rb', line 48 def ==(other) other.is_a?(User) && @member_id == other.member_id && @member_group_id == other.member_group_id && @name == other.name && @profile_url == other.profile_url end |