Class: SingularityClient::CLI
- Inherits:
-
Thor
- Object
- Thor
- SingularityClient::CLI
- Defined in:
- lib/singularity_client/cli.rb
Overview
Handles all command line interface logic
Instance Attribute Summary collapse
-
#config_hash ⇒ Object
readonly
Returns the value of attribute config_hash.
Instance Method Summary collapse
- #add(repo, project) ⇒ Object
- #comment(repo, pr, comment) ⇒ Object
- #config ⇒ Object
-
#initialize(*args) ⇒ CLI
constructor
A new instance of CLI.
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() end |
Instance Attribute Details
#config_hash ⇒ Object (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 |
#config ⇒ Object
27 28 29 |
# File 'lib/singularity_client/cli.rb', line 27 def config SingularityClient::API.config(config_hash) end |