Class: Ribose::Profile
- Includes:
- Actions::Fetch, Actions::Update
- Defined in:
- lib/ribose/profile.rb
Class Method Summary collapse
-
.fetch(options = {}) ⇒ Sawyer::Resource
Fetch user profile.
-
.set_login(name, options = {}) ⇒ Sawyer::Resource
Set login name.
-
.update(attributes) ⇒ Sawyer::Resource
Update user profile.
Instance Method Summary collapse
Methods included from Actions::Update
Methods included from Actions::Base
Methods included from Actions::Fetch
Methods inherited from Base
Methods included from ResourceHelper
#resource_id, #resource_key, #resource_path, #resources
Constructor Details
This class inherits a constructor from Ribose::Base
Class Method Details
.fetch(options = {}) ⇒ Sawyer::Resource
Fetch user profile
15 16 17 |
# File 'lib/ribose/profile.rb', line 15 def self.fetch( = {}) new(resource_id: nil, **).fetch end |
.set_login(name, options = {}) ⇒ Sawyer::Resource
Set login name
33 34 35 |
# File 'lib/ribose/profile.rb', line 33 def self.set_login(name, = {}) new(login: name, **).set_login end |
.update(attributes) ⇒ Sawyer::Resource
Update user profile
24 25 26 |
# File 'lib/ribose/profile.rb', line 24 def self.update(attributes) new(resource_id: nil, **attributes).update end |
Instance Method Details
#set_login ⇒ Object
6 7 8 |
# File 'lib/ribose/profile.rb', line 6 def set_login update_login_name[resource_key] end |