Class: SingularityClient::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/singularity_client/cli.rb

Overview

Handles all command line interface logic

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ CLI

Returns a new instance of CLI.



11
12
13
14
# File 'lib/singularity_client/cli.rb', line 11

def initialize(*args)
  super
  @cli_options = options
end

Instance Attribute Details

#config_hashObject (readonly)

Returns the value of attribute config_hash.



9
10
11
# File 'lib/singularity_client/cli.rb', line 9

def config_hash
  @config_hash
end

Instance Method Details

#add(repo, project) ⇒ Object



35
36
37
38
# File 'lib/singularity_client/cli.rb', line 35

def add(repo, project)
  run(:add, repo, project, 'pull_request')
  run(:add, repo, project, 'push')
end

#add_pull(repo, project) ⇒ Object



43
44
45
# File 'lib/singularity_client/cli.rb', line 43

def add_pull(repo, project)
  run(:add, repo, project, 'pull_request')
end

#add_push(repo, project) ⇒ Object



50
51
52
# File 'lib/singularity_client/cli.rb', line 50

def add_push(repo, project)
  run(:add, repo, project, 'push')
end

#comment(repo, pr, comment) ⇒ Object



57
58
59
# File 'lib/singularity_client/cli.rb', line 57

def comment(repo, pr, comment)
  run(:comment, repo, pr, comment)
end

#configObject



27
28
29
# File 'lib/singularity_client/cli.rb', line 27

def config
  run(:config)
end