Class: GemDandy::RubygemsProfile

Inherits:
Command
  • Object
show all
Includes:
ConfigFile, Output
Defined in:
lib/gem_dandy/rubygems_profile.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
15
16
17
18
19
20
# File 'lib/gem_dandy/rubygems_profile.rb', line 6

def perform_action
  perform_checks

  if options[:switch_given]
    switch_profile_to( options[:switch] )
    display_active_profile
  elsif options[:list_given]
    list_configured_profiles
  elsif options[:show_given]
    confirm_show_configured_profile_options
    show_configured_profile( options[:show] )
  else
    display_active_profile
  end
end