Class: Txgh::ResourceDeleter

Inherits:
Object
  • Object
show all
Includes:
CategorySupport
Defined in:
lib/txgh/resource_deleter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from CategorySupport

#deserialize_categories, #escape_category, #join_categories, #serialize_categories

Constructor Details

#initialize(project, repo, branch, options = {}) ⇒ ResourceDeleter

Returns a new instance of ResourceDeleter.



7
8
9
10
11
# File 'lib/txgh/resource_deleter.rb', line 7

def initialize(project, repo, branch, options = {})
  @project = project
  @repo = repo
  @branch = branch
end

Instance Attribute Details

#branchObject (readonly)

Returns the value of attribute branch.



5
6
7
# File 'lib/txgh/resource_deleter.rb', line 5

def branch
  @branch
end

#projectObject (readonly)

Returns the value of attribute project.



5
6
7
# File 'lib/txgh/resource_deleter.rb', line 5

def project
  @project
end

#repoObject (readonly)

Returns the value of attribute repo.



5
6
7
# File 'lib/txgh/resource_deleter.rb', line 5

def repo
  @repo
end

Instance Method Details

#delete_resourcesObject



13
14
15
16
17
# File 'lib/txgh/resource_deleter.rb', line 13

def delete_resources
  tx_resources.each do |tx_resource|
    project.api.delete_resource(tx_resource)
  end
end