Class: SafePusher::CLI
- Inherits:
-
Object
- Object
- SafePusher::CLI
- Defined in:
- lib/safe_pusher/cli.rb
Instance Method Summary collapse
-
#initialize(arguments:) ⇒ CLI
constructor
A new instance of CLI.
- #start ⇒ Object
Constructor Details
#initialize(arguments:) ⇒ CLI
Returns a new instance of CLI.
3 4 5 |
# File 'lib/safe_pusher/cli.rb', line 3 def initialize(arguments:) @arguments = arguments end |
Instance Method Details
#start ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/safe_pusher/cli.rb', line 7 def start return version if arguments.first == '--version' help if commands.include?(nil) commands.compact.each { |command| execute_command(command) } end |