Class: Atlas::User
Overview
Representation and handling of User objects.
Constant Summary
Constants inherited from Resource
Resource::INTERNAL_ATTRIBUTE_KEYS
Instance Attribute Summary collapse
-
#avatar_url ⇒ Object
Returns the value of attribute avatar_url.
-
#profile ⇒ Object
Returns the value of attribute profile.
-
#username ⇒ Object
Returns the value of attribute username.
Attributes inherited from Resource
Class Method Summary collapse
Instance Method Summary collapse
- #boxes ⇒ Object
- #boxes=(hash) ⇒ Object
-
#initialize(tag, hash = {}) ⇒ User
constructor
A new instance of User.
Methods inherited from Resource
#attributes, date_accessor, date_writer, #inspect, #to_hash, #update_with_response
Methods included from Validations
Constructor Details
#initialize(tag, hash = {}) ⇒ User
Returns a new instance of User.
13 14 15 16 17 |
# File 'lib/atlas/user.rb', line 13 def initialize(tag, hash = {}) hash['profile'] = hash['profile_markdown'] super(tag, hash) end |
Instance Attribute Details
#avatar_url ⇒ Object
Returns the value of attribute avatar_url.
4 5 6 |
# File 'lib/atlas/user.rb', line 4 def avatar_url @avatar_url end |
#profile ⇒ Object
Returns the value of attribute profile.
4 5 6 |
# File 'lib/atlas/user.rb', line 4 def profile @profile end |
#username ⇒ Object
Returns the value of attribute username.
4 5 6 |
# File 'lib/atlas/user.rb', line 4 def username @username end |
Class Method Details
.find(tag) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/atlas/user.rb', line 6 def self.find(tag) url_builder = UrlBuilder.new(tag) response = Atlas.client.get(url_builder.user_url) new(tag, response) end |