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
  @config_hash = SingularityClient::Config.new(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



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

def add(repo, project)
  SingularityClient::API.add(config_hash, repo, project)
end

#comment(repo, pr, comment) ⇒ Object



41
42
43
# File 'lib/singularity_client/cli.rb', line 41

def comment(repo, pr, comment)
  SingularityClient::API.comment(config_hash, repo, pr, comment)
end

#configObject



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

def config
  SingularityClient::API.config(config_hash)
end