class GitContext::Commands::CreateProfile

Public Instance Methods

call() click to toggle source
# File lib/git_context/commands/create_profile.rb, line 6
def call
  profile_name = @interaction.prompt_profile_name
  input = @interaction.prompt_user_info

  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