Class: Gerd::Inspections::Actions::CreateRepo
- Inherits:
-
Object
- Object
- Gerd::Inspections::Actions::CreateRepo
- Defined in:
- lib/gerd/inspections/actions/create_repo.rb
Instance Method Summary collapse
-
#initialize(repo_to_create, org, privacy = false) ⇒ CreateRepo
constructor
A new instance of CreateRepo.
- #invoke(client, options = {}) ⇒ Object
Constructor Details
#initialize(repo_to_create, org, privacy = false) ⇒ CreateRepo
Returns a new instance of CreateRepo.
7 8 9 10 11 |
# File 'lib/gerd/inspections/actions/create_repo.rb', line 7 def initialize(repo_to_create, org, privacy = false) @org = org @repo = repo_to_create @privacy = privacy end |
Instance Method Details
#invoke(client, options = {}) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/gerd/inspections/actions/create_repo.rb', line 13 def invoke(client, = {}) puts "Creating #{@org}/#{@repo}" opts = { :organization => @org, :private => @privacy } res = client.create_repo(@repo, { :organization => @org }) end |