Class: GitLab::User
- Inherits:
-
Object
- Object
- GitLab::User
- Defined in:
- lib/GitLab/user.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ User
constructor
A new instance of User.
- #to_s ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ User
Returns a new instance of User.
4 5 6 |
# File 'lib/GitLab/user.rb', line 4 def initialize(params = {}) @name = params[:name] end |
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
2 3 4 |
# File 'lib/GitLab/user.rb', line 2 def email @email end |
#id ⇒ Object
Returns the value of attribute id.
2 3 4 |
# File 'lib/GitLab/user.rb', line 2 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/GitLab/user.rb', line 2 def name @name end |
Class Method Details
.all ⇒ Object
12 13 14 |
# File 'lib/GitLab/user.rb', line 12 def self.all GitLab.request_get("projects/#{$GITLAB_PROJECT_ID}/users") end |
.me ⇒ Object
8 9 10 |
# File 'lib/GitLab/user.rb', line 8 def self.me GitLab.request_get("projects/#{$GITLAB_PROJECT_ID}/users?search=#{$GITLAB_EMAIL}")[0] end |
Instance Method Details
#to_s ⇒ Object
16 17 |
# File 'lib/GitLab/user.rb', line 16 def to_s end |