Sha256: 29d1f50b2cf9050cafaacfd998c2d3fce00744afce595903dbd85ed354f3d950

Contents?: true

Size: 445 Bytes

Versions: 1

Compression:

Stored size: 445 Bytes

Contents

module InstanceSelector
  module Providers
    # Uses the HOSTS environment variable instead of a cloud provider
    class Override < AbstractProvider
      def initialize(_options = {})
        @hosts = ENV['HOSTS']
      end

      def instances(_args = {})
        results = {}
        ENV['HOSTS'].split(',').each do |host|
          results[host] = { name: host, identifier: 'N/A' }
        end

        results
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
instance_selector-0.3.0 lib/instance_selector/providers/override.rb