Class: Ufo::Apps::Cluster

Inherits:
Object
  • Object
show all
Defined in:
lib/ufo/apps/cluster.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.allObject



3
4
5
# File 'lib/ufo/apps/cluster.rb', line 3

def self.all
  new.all
end

Instance Method Details

#allObject



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/ufo/apps/cluster.rb', line 7

def all
  Ufo.check_ufo_project!
  clusters = if settings[:service_cluster]
    settings[:service_cluster].values
  elsif settings[:cluster]
    settings[:cluster]
  else
    Ufo.env
  end
  [clusters].flatten.compact
end