Class: Travis::Artifacts::Cli
- Inherits:
-
Object
- Object
- Travis::Artifacts::Cli
- Defined in:
- lib/travis/artifacts/cli.rb
Constant Summary collapse
- VALID_COMMANDS =
['upload']
Instance Attribute Summary collapse
-
#argv ⇒ Object
readonly
Returns the value of attribute argv.
-
#client ⇒ Object
Returns the value of attribute client.
-
#command ⇒ Object
Returns the value of attribute command.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#paths ⇒ Object
readonly
Returns the value of attribute paths.
Instance Method Summary collapse
-
#initialize(argv = nil) ⇒ Cli
constructor
A new instance of Cli.
- #root ⇒ Object
-
#start ⇒ Object
I would like to use option parser for now, to keep the code super simple and without too much external dependencies, if it grows too much, I may change it.
- #upload ⇒ Object
Constructor Details
Instance Attribute Details
#argv ⇒ Object (readonly)
Returns the value of attribute argv.
5 6 7 |
# File 'lib/travis/artifacts/cli.rb', line 5 def argv @argv end |
#client ⇒ Object
Returns the value of attribute client.
6 7 8 |
# File 'lib/travis/artifacts/cli.rb', line 6 def client @client end |
#command ⇒ Object
Returns the value of attribute command.
6 7 8 |
# File 'lib/travis/artifacts/cli.rb', line 6 def command @command end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/travis/artifacts/cli.rb', line 5 def @options end |
#paths ⇒ Object (readonly)
Returns the value of attribute paths.
5 6 7 |
# File 'lib/travis/artifacts/cli.rb', line 5 def paths @paths end |
Instance Method Details
#root ⇒ Object
27 28 29 |
# File 'lib/travis/artifacts/cli.rb', line 27 def root [:root] || Dir.pwd end |
#start ⇒ Object
I would like to use option parser for now, to keep the code super simple and without too much external dependencies, if it grows too much, I may change it
20 21 22 23 24 25 |
# File 'lib/travis/artifacts/cli.rb', line 20 def start parse! create_paths execute_command end |