Class: Gitlab::User

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab_reviewbot/gitlab.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, username, review_count = 0) ⇒ User

Returns a new instance of User.



9
10
11
12
13
# File 'lib/gitlab_reviewbot/gitlab.rb', line 9

def initialize(id, username, review_count = 0)
  @id = id
  @username = username
  @review_count = review_count
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



6
7
8
# File 'lib/gitlab_reviewbot/gitlab.rb', line 6

def id
  @id
end

#review_countObject

Returns the value of attribute review_count.



7
8
9
# File 'lib/gitlab_reviewbot/gitlab.rb', line 7

def review_count
  @review_count
end

#usernameObject

Returns the value of attribute username.



5
6
7
# File 'lib/gitlab_reviewbot/gitlab.rb', line 5

def username
  @username
end

Instance Method Details

#==(other) ⇒ Object



15
16
17
# File 'lib/gitlab_reviewbot/gitlab.rb', line 15

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