class SemaphoreClient::Model::User
Attributes
created_at[R]
name[R]
uid[R]
updated_at[R]
username[R]
Public Class Methods
create(attributes)
click to toggle source
# File lib/semaphore_client/model/user.rb, line 10 def self.create(attributes) new.update(attributes) end
load(attributes)
click to toggle source
# File lib/semaphore_client/model/user.rb, line 6 def self.load(attributes) new.load(attributes) end
Public Instance Methods
load(attributes)
click to toggle source
# File lib/semaphore_client/model/user.rb, line 14 def load(attributes) attributes = symbolize_keys(attributes) @uid = attributes[:uid] if attributes.key?(:uid) @username = attributes[:username] if attributes.key?(:username) @name = attributes[:name] if attributes.key?(:name) @created_at = attributes[:created_at] if attributes.key?(:created_at) @updated_at = attributes[:updated_at] if attributes.key?(:updated_at) self end
serialize()
click to toggle source
# File lib/semaphore_client/model/user.rb, line 30 def serialize {} end
update(attributes)
click to toggle source
# File lib/semaphore_client/model/user.rb, line 26 def update(attributes) self end
Private Instance Methods
symbolize_keys(hash)
click to toggle source
# File lib/semaphore_client/model/user.rb, line 36 def symbolize_keys(hash) Hash[hash.map { |key, value| [key.to_sym, value] }] end