Class: Ninny::CLI
- Inherits:
-
Thor
- Object
- Thor
- Ninny::CLI
- Defined in:
- lib/ninny/cli.rb
Overview
Handle the application command line parsing and the dispatch to various command objects
Constant Summary collapse
- Error =
Error raised by this runner
Class.new(StandardError)
Instance Method Summary collapse
- #new_staging ⇒ Object
- #setup ⇒ Object
- #stage_up(pull_request_id = nil) ⇒ Object
- #staging_branch ⇒ Object
- #version ⇒ Object
Instance Method Details
#new_staging ⇒ Object
48 49 50 51 52 53 54 55 |
# File 'lib/ninny/cli.rb', line 48 def new_staging(*) if [:help] invoke :help, ['new_staging'] else require_relative 'commands/new_staging' Ninny::Commands::NewStaging.new().execute end end |
#setup ⇒ Object
60 61 62 63 64 65 66 67 |
# File 'lib/ninny/cli.rb', line 60 def setup(*) if [:help] invoke :help, ['setup'] else require_relative 'commands/setup' Ninny::Commands::Setup.new().execute end end |
#stage_up(pull_request_id = nil) ⇒ Object
36 37 38 39 40 41 42 43 |
# File 'lib/ninny/cli.rb', line 36 def stage_up(pull_request_id = nil) if [:help] invoke :help, ['stage_up'] else require_relative 'commands/stage_up' Ninny::Commands::StageUp.new(pull_request_id, ).execute end end |
#staging_branch ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/ninny/cli.rb', line 23 def staging_branch(*) if [:help] invoke :help, ['staging_branch'] else require_relative 'commands/staging_branch' Ninny::Commands::StagingBranch.new().execute end end |