Class: GitContext::Commands::CreateContext
- Defined in:
- lib/git_context/commands/create_context.rb
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from GitContext::Commands::Base
Instance Method Details
#call ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/git_context/commands/create_context.rb', line 6 def call profile_names = @configuration.list_profile_names work_dir = @interaction.prompt_work_dir(Dir.pwd) profile_name = @interaction.prompt_profile(profile_names) context = Context.new(work_dir, profile_name) @configuration.add_context(context) @interaction.info("Context created to use #{profile_name} within #{work_dir}.") end |