Class: Cp8Cli::Main
- Inherits:
-
Object
- Object
- Cp8Cli::Main
- Defined in:
- lib/cp8_cli/main.rb
Instance Method Summary collapse
- #ci ⇒ 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.
9 10 11 12 |
# File 'lib/cp8_cli/main.rb', line 9 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
26 27 28 |
# File 'lib/cp8_cli/main.rb', line 26 def ci Branch.current.open_ci # TODO: move to /commands end |
#open ⇒ Object
18 19 20 |
# File 'lib/cp8_cli/main.rb', line 18 def open Branch.current.open_story_in_browser # TODO: move to /commands end |
#start(name) ⇒ Object
14 15 16 |
# File 'lib/cp8_cli/main.rb', line 14 def start(name) Commands::Start.new(name).run end |
#submit(options = {}) ⇒ Object
22 23 24 |
# File 'lib/cp8_cli/main.rb', line 22 def submit( = {}) Commands::Submit.new().run end |
#suggest ⇒ Object
30 31 32 |
# File 'lib/cp8_cli/main.rb', line 30 def suggest Commands::Suggest.new.run end |