Class: GitTopic::Cli
- Inherits:
-
Thor
- Object
- Thor
- GitTopic::Cli
- Defined in:
- lib/git_topic/cli.rb
Overview
CLI command entry point
Instance Method Summary collapse
- #add(topic_name, summary) ⇒ Object
- #edit(branch_name = nil) ⇒ Object
- #list ⇒ Object
- #publish(branch_name) ⇒ Object
- #show(branch_name = nil) ⇒ Object
- #start(topic_name) ⇒ Object
- #version ⇒ Object
Instance Method Details
#add(topic_name, summary) ⇒ Object
49 50 51 52 |
# File 'lib/git_topic/cli.rb', line 49 def add(topic_name, summary) command = GitTopic::Commands::Add.new topic_name, summary command.execute end |
#edit(branch_name = nil) ⇒ Object
32 33 34 35 |
# File 'lib/git_topic/cli.rb', line 32 def edit(branch_name = nil) command = GitTopic::Commands::Edit.new branch_name command.execute end |
#list ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/git_topic/cli.rb', line 20 def list # Show version if -v specified if [:version] version if [:version] return end command = GitTopic::Commands::List.new command.execute end |
#publish(branch_name) ⇒ Object
61 62 63 64 |
# File 'lib/git_topic/cli.rb', line 61 def publish(branch_name) puts "publish #{branch_name}" raise 'not implemented' end |
#show(branch_name = nil) ⇒ Object
38 39 40 41 |
# File 'lib/git_topic/cli.rb', line 38 def show(branch_name = nil) command = GitTopic::Commands::Show.new branch_name command.execute end |
#start(topic_name) ⇒ Object
55 56 57 58 |
# File 'lib/git_topic/cli.rb', line 55 def start(topic_name) puts "start #{topic_name}" raise 'not implemented' end |