Sha256: ae40376bdbcf3b30437530b662f349a01f7b9671392f7e4116215662a98c18e1

Contents?: true

Size: 524 Bytes

Versions: 8

Compression:

Stored size: 524 Bytes

Contents

class Ufo::Setting
  class SecurityGroups
    include Ufo::Settings
    extend Memoist

    def initialize(service, type)
      @service, @type = service, type
    end

    def load
      groups = network[@type] # IE: network[:ecs_security_groups] or network[:elb_security_groups]
      return [] unless groups

      case groups
      when Array # same security groups used for all services
        groups
      when Hash # service specific security groups
        groups[@service.to_sym] || []
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ufo-5.0.7 lib/ufo/setting/security_groups.rb
ufo-5.0.6 lib/ufo/setting/security_groups.rb
ufo-5.0.5 lib/ufo/setting/security_groups.rb
ufo-5.0.4 lib/ufo/setting/security_groups.rb
ufo-5.0.3 lib/ufo/setting/security_groups.rb
ufo-5.0.2 lib/ufo/setting/security_groups.rb
ufo-5.0.1 lib/ufo/setting/security_groups.rb
ufo-5.0.0 lib/ufo/setting/security_groups.rb