Class: Txgh::ResourceDeleter
- Inherits:
-
Object
- Object
- Txgh::ResourceDeleter
- Includes:
- CategorySupport
- Defined in:
- lib/txgh/resource_deleter.rb
Instance Attribute Summary collapse
-
#branch ⇒ Object
readonly
Returns the value of attribute branch.
-
#project ⇒ Object
readonly
Returns the value of attribute project.
-
#repo ⇒ Object
readonly
Returns the value of attribute repo.
Instance Method Summary collapse
- #delete_resources ⇒ Object
-
#initialize(project, repo, branch, options = {}) ⇒ ResourceDeleter
constructor
A new instance of ResourceDeleter.
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, = {}) @project = project @repo = repo @branch = branch end |
Instance Attribute Details
#branch ⇒ Object (readonly)
Returns the value of attribute branch.
5 6 7 |
# File 'lib/txgh/resource_deleter.rb', line 5 def branch @branch end |
#project ⇒ Object (readonly)
Returns the value of attribute project.
5 6 7 |
# File 'lib/txgh/resource_deleter.rb', line 5 def project @project end |
#repo ⇒ Object (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_resources ⇒ Object
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 |