Class: Gitlab::Cli::Project

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api, options) ⇒ Project

Returns a new instance of Project.



8
9
10
11
12
# File 'lib/gitlab/cli/project.rb', line 8

def initialize(api, options)
  @id = options[:id]
  @name = options[:name]
  @api = api
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



6
7
8
# File 'lib/gitlab/cli/project.rb', line 6

def id
  @id
end

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/gitlab/cli/project.rb', line 6

def name
  @name
end

Instance Method Details

#update_variables(variables) ⇒ Object



14
15
16
17
18
19
# File 'lib/gitlab/cli/project.rb', line 14

def update_variables(variables)
  if @id == 534
    delete_existing_vars
    create_given_vars(variables)
  end
end