Class: Carson::Adapters::GitHub

Inherits:
Object
  • Object
show all
Defined in:
lib/carson/adapters/github.rb

Instance Method Summary collapse

Constructor Details

#initialize(repo_root:) ⇒ GitHub

Returns a new instance of GitHub.



6
7
8
# File 'lib/carson/adapters/github.rb', line 6

def initialize( repo_root: )
	@repo_root = repo_root
end

Instance Method Details

#run(*args) ⇒ Object



10
11
12
13
# File 'lib/carson/adapters/github.rb', line 10

def run( *args )
	stdout_text, stderr_text, status = Open3.capture3( "gh", *args, chdir: repo_root )
	[ stdout_text, stderr_text, status.success?, status.exitstatus ]
end