Class: TrelloFlow::Main
- Inherits:
-
Object
- Object
- TrelloFlow::Main
- Defined in:
- lib/trello_flow/main.rb
Instance Method Summary collapse
- #cleanup ⇒ Object
- #finish ⇒ Object
-
#initialize(global_config = GlobalConfig.new, local_config = LocalConfig.new) ⇒ Main
constructor
A new instance of Main.
- #open ⇒ Object
- #start(name) ⇒ Object
Constructor Details
#initialize(global_config = GlobalConfig.new, local_config = LocalConfig.new) ⇒ Main
Returns a new instance of Main.
6 7 8 9 |
# File 'lib/trello_flow/main.rb', line 6 def initialize(global_config = GlobalConfig.new, local_config = LocalConfig.new) Api::Base.configure(key: global_config.key, token: global_config.token) @local_config = local_config end |
Instance Method Details
#cleanup ⇒ Object
29 30 31 |
# File 'lib/trello_flow/main.rb', line 29 def cleanup Cleanup.new(Branch.current.target).run end |
#finish ⇒ Object
22 23 24 25 26 27 |
# File 'lib/trello_flow/main.rb', line 22 def finish branch = Branch.current branch.push branch.open_pull_request branch.finish_current_card end |