class SemaphoreClient::Model::Project
Attributes
created_at[R]
html_url[R]
id[R]
name[R]
secrets_url[R]
updated_at[R]
users_url[R]
Public Class Methods
create(attributes)
click to toggle source
# File lib/semaphore_client/model/project.rb, line 10 def self.create(attributes) new.update(attributes) end
load(attributes)
click to toggle source
# File lib/semaphore_client/model/project.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/project.rb, line 14 def load(attributes) attributes = symbolize_keys(attributes) @id = attributes[:id] if attributes.key?(:id) @name = attributes[:name] if attributes.key?(:name) @html_url = attributes[:html_url] if attributes.key?(:html_url) @users_url = attributes[:users_url] if attributes.key?(:users_url) @secrets_url = attributes[:secrets_url] if attributes.key?(:secrets_url) @updated_at = attributes[:updated_at] if attributes.key?(:updated_at) @created_at = attributes[:created_at] if attributes.key?(:created_at) self end
serialize()
click to toggle source
# File lib/semaphore_client/model/project.rb, line 32 def serialize {} end
update(attributes)
click to toggle source
# File lib/semaphore_client/model/project.rb, line 28 def update(attributes) self end
Private Instance Methods
symbolize_keys(hash)
click to toggle source
# File lib/semaphore_client/model/project.rb, line 38 def symbolize_keys(hash) Hash[hash.map { |key, value| [key.to_sym, value] }] end