Class: Bog::Command::List

Inherits:
Object
  • Object
show all
Defined in:
lib/bog/command/list.rb

Class Method Summary collapse

Class Method Details

.executeObject



6
7
8
9
10
11
12
13
# File 'lib/bog/command/list.rb', line 6

def self.execute
  profiles = Dir.glob(
    File.expand_path(ENV['HOME'] + "/.bog/profiles/*/") )
  profiles.collect! { |p| p.split('/').last }
  profiles.select { |p|
    p == Bog::Profile.current.profile_name }[0] << "*"
  puts profiles.sort
end