Class: GitContext::Commands::CreateProfile

Inherits:
Base
  • Object
show all
Defined in:
lib/git_context/commands/create_profile.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from GitContext::Commands::Base

Instance Method Details

#callObject



6
7
8
9
10
11
12
13
14
15
# File 'lib/git_context/commands/create_profile.rb', line 6

def call
  profile_name = @interaction.prompt_profile_name
  input = @interaction.

  user = User.new(input[:name], input[:email], input[:signing_key])
  profile = Profile.new(profile_name, user)
  @configuration.add_profile(profile)

  @interaction.info("Profile #{profile_name} created.")
end