Class: HackerOne::Client::User
- Inherits:
-
Object
- Object
- HackerOne::Client::User
- Includes:
- ResourceHelper
- Defined in:
- lib/hackerone/client/user.rb
Class Method Summary collapse
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(user) ⇒ User
constructor
A new instance of User.
Methods included from ResourceHelper
included, #make_get_request, #make_post_request, #parse_response
Constructor Details
#initialize(user) ⇒ User
Returns a new instance of User.
13 14 15 |
# File 'lib/hackerone/client/user.rb', line 13 def initialize(user) @user = user end |
Class Method Details
.find(username_we_want) ⇒ Object
8 9 10 11 |
# File 'lib/hackerone/client/user.rb', line 8 def self.find(username_we_want) user_json = make_get_request("users/#{username_we_want}") new(user_json) end |
Instance Method Details
#id ⇒ Object
17 18 19 |
# File 'lib/hackerone/client/user.rb', line 17 def id @user[:id] end |