Class: SemaphoreClient::Model::Project

Inherits:
Object
  • Object
show all
Defined in:
lib/semaphore_client/model/project.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#created_atObject (readonly)

Returns the value of attribute created_at.



4
5
6
# File 'lib/semaphore_client/model/project.rb', line 4

def created_at
  @created_at
end

#html_urlObject (readonly)

Returns the value of attribute html_url.



4
5
6
# File 'lib/semaphore_client/model/project.rb', line 4

def html_url
  @html_url
end

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/semaphore_client/model/project.rb', line 4

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/semaphore_client/model/project.rb', line 4

def name
  @name
end

#secrets_urlObject (readonly)

Returns the value of attribute secrets_url.



4
5
6
# File 'lib/semaphore_client/model/project.rb', line 4

def secrets_url
  @secrets_url
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



4
5
6
# File 'lib/semaphore_client/model/project.rb', line 4

def updated_at
  @updated_at
end

#users_urlObject (readonly)

Returns the value of attribute users_url.



4
5
6
# File 'lib/semaphore_client/model/project.rb', line 4

def users_url
  @users_url
end

Class Method Details

.create(attributes) ⇒ Object



10
11
12
# File 'lib/semaphore_client/model/project.rb', line 10

def self.create(attributes)
  new.update(attributes)
end

.load(attributes) ⇒ Object



6
7
8
# File 'lib/semaphore_client/model/project.rb', line 6

def self.load(attributes)
  new.load(attributes)
end

Instance Method Details

#load(attributes) ⇒ Object



14
15
16
17
18
19
20
21
22
23
24
25
26
# 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

#serializeObject



32
33
34
# File 'lib/semaphore_client/model/project.rb', line 32

def serialize
  {}
end

#update(attributes) ⇒ Object



28
29
30
# File 'lib/semaphore_client/model/project.rb', line 28

def update(attributes)
  self
end