class ALD::API::User
A user registered on an ALD server.
Public
↑ topPublic Instance Methods
id()
click to toggle source
joined()
click to toggle source
mailMD5()
click to toggle source
name()
click to toggle source
Internal
↑ topPublic Class Methods
new(api, data, initialized = false)
click to toggle source
Create a new instance. This method is called by ALD::API#user and should not be called by library consumers.
- api
-
The ALD::API instance this user belongs to
- data
-
a Hash containing the user's data
- initialized
-
a Boolean indicating whether the given data is complete or further API requests are necessary.
Calls superclass method
ALD::API::CollectionEntry.new
# File lib/ALD/user.rb, line 50 def initialize(api, data, initialized = false) super(api, data, initialized) end
Private Class Methods
initialized_attributes()
click to toggle source
requested_attributes()
click to toggle source
Private Instance Methods
request()
click to toggle source
If the data given to the constructor was not complete, use the API to request further information from the server.
Returns¶ ↑
Returns nothing.
# File lib/ALD/user.rb, line 71 def request @data = @api.request("/users/#{id}") @data['privileges'].map!(&:to_sym) @data['joined'] = DateTime.parse(@data['joined']) end