Class: GitlabCli::Project

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, name, description, default_branch, public, path, path_with_namespace, issues_enabled, merge_requests_enabled, wall_enabled, wiki_enabled, created_at, owner = nil) ⇒ Project

Returns a new instance of Project.



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/gitlab_cli/project.rb', line 5

def initialize(id, name, description, default_branch, public, path, path_with_namespace, issues_enabled, merge_requests_enabled, wall_enabled, wiki_enabled, created_at, owner=nil)
  @id = id
  @name = name
  @description = description
  @default_branch = default_branch
  @public = public
  @path = path
  @path_with_namespace = path_with_namespace
  @issues_enabled = issues_enabled
  @merge_requests_enabled = merge_requests_enabled
  @wall_enabled = wall_enabled 
  @wiki_enabled = wiki_enabled
  @created_at = created_at
  @project_url = get_project_url

  @owner = owner.class == 'Gitlab::User' || owner.nil? ? owner : parse_owner(owner)
end

Instance Attribute Details

#created_atObject

Returns the value of attribute created_at.



3
4
5
# File 'lib/gitlab_cli/project.rb', line 3

def created_at
  @created_at
end

#default_branchObject

Returns the value of attribute default_branch.



3
4
5
# File 'lib/gitlab_cli/project.rb', line 3

def default_branch
  @default_branch
end

#descriptionObject

Returns the value of attribute description.



3
4
5
# File 'lib/gitlab_cli/project.rb', line 3

def description
  @description
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/gitlab_cli/project.rb', line 3

def id
  @id
end

#issues_enabledObject

Returns the value of attribute issues_enabled.



3
4
5
# File 'lib/gitlab_cli/project.rb', line 3

def issues_enabled
  @issues_enabled
end

#merge_requests_enabledObject

Returns the value of attribute merge_requests_enabled.



3
4
5
# File 'lib/gitlab_cli/project.rb', line 3

def merge_requests_enabled
  @merge_requests_enabled
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/gitlab_cli/project.rb', line 3

def name
  @name
end

#ownerObject

Returns the value of attribute owner.



3
4
5
# File 'lib/gitlab_cli/project.rb', line 3

def owner
  @owner
end

#pathObject

Returns the value of attribute path.



3
4
5
# File 'lib/gitlab_cli/project.rb', line 3

def path
  @path
end

#path_with_namespaceObject

Returns the value of attribute path_with_namespace.



3
4
5
# File 'lib/gitlab_cli/project.rb', line 3

def path_with_namespace
  @path_with_namespace
end

#project_urlObject

Returns the value of attribute project_url.



3
4
5
# File 'lib/gitlab_cli/project.rb', line 3

def project_url
  @project_url
end

#publicObject

Returns the value of attribute public.



3
4
5
# File 'lib/gitlab_cli/project.rb', line 3

def public
  @public
end

#wall_enabledObject

Returns the value of attribute wall_enabled.



3
4
5
# File 'lib/gitlab_cli/project.rb', line 3

def wall_enabled
  @wall_enabled
end

#wiki_enabledObject

Returns the value of attribute wiki_enabled.



3
4
5
# File 'lib/gitlab_cli/project.rb', line 3

def wiki_enabled
  @wiki_enabled
end