Class: GemDandy::Configuration

Inherits:
Command
  • Object
show all
Includes:
ConfigFile, Output
Defined in:
lib/gem_dandy/configuration.rb

Instance Attribute Summary

Attributes inherited from Command

#options

Instance Method Summary collapse

Methods included from Output

#die, #report

Methods included from ConfigFile

#api_keys, #config_file_name, #find_api_key, #gemdandy_rc_file

Methods inherited from Command

#initialize

Constructor Details

This class inherits a constructor from GemDandy::Command

Instance Method Details

#perform_actionObject



6
7
8
9
10
11
12
13
14
# File 'lib/gem_dandy/configuration.rb', line 6

def perform_action
  if options[:clear_given]
    clear_config
  else
    confirm_add_to_config_options
    add_to_config( options[:profile], options[:key] )
    confirm_add_to_config_success
  end
end