Class: Cp8Cli::Main
- Inherits:
-
Object
- Object
- Cp8Cli::Main
- Defined in:
- lib/cp8_cli/main.rb
Instance Method Summary collapse
- #ci ⇒ Object
- #cleanup ⇒ Object
-
#initialize(global_config = GlobalConfig.new) ⇒ Main
constructor
A new instance of Main.
- #open ⇒ Object
- #start(name) ⇒ Object
- #submit(options = {}) ⇒ Object
- #suggest ⇒ Object
Constructor Details
#initialize(global_config = GlobalConfig.new) ⇒ Main
Returns a new instance of Main.
10 11 12 13 |
# File 'lib/cp8_cli/main.rb', line 10 def initialize(global_config = GlobalConfig.new) Trello::Base.configure(key: global_config.trello_key, token: global_config.trello_token) Github::Base.configure(token: global_config.github_token) end |
Instance Method Details
#ci ⇒ Object
27 28 29 |
# File 'lib/cp8_cli/main.rb', line 27 def ci Branch.current.open_ci # TODO: move to /commands end |
#cleanup ⇒ Object
35 36 37 |
# File 'lib/cp8_cli/main.rb', line 35 def cleanup Commands::Cleanup.new.run end |
#open ⇒ Object
19 20 21 |
# File 'lib/cp8_cli/main.rb', line 19 def open Branch.current.open_story_in_browser # TODO: move to /commands end |
#start(name) ⇒ Object
15 16 17 |
# File 'lib/cp8_cli/main.rb', line 15 def start(name) Commands::Start.new(name).run end |
#submit(options = {}) ⇒ Object
23 24 25 |
# File 'lib/cp8_cli/main.rb', line 23 def submit( = {}) Commands::Submit.new().run end |
#suggest ⇒ Object
31 32 33 |
# File 'lib/cp8_cli/main.rb', line 31 def suggest Commands::Suggest.new.run end |