Sha256: 21a1659efe6b0ab347272f73f26a6cbf6d5e4fa49af1ee8091f5515abb00d82a

Contents?: true

Size: 502 Bytes

Versions: 186

Compression:

Stored size: 502 Bytes

Contents

module Bosh::Stemcell
  module Agent
    def self.for(name)
      case name
        when 'go'
          Go.new
        when 'null'
          NullAgent.new
        else
          raise ArgumentError.new("invalid agent: #{name}")
      end
    end

    class NullAgent
      def name
        'null'
      end

      def ==(other)
        name == other.name
      end
    end

    class Go
      def name
        'go'
      end

      def ==(other)
        name == other.name
      end
    end
  end
end

Version data entries

186 entries across 186 versions & 1 rubygems

Version Path
bosh-stemcell-1.3048.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3042.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3039.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3033.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3031.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3030.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3029.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3026.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3025.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3022.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3016.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3012.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3010.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3008.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3004.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3003.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3001.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3000.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2999.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2992.0 lib/bosh/stemcell/agent.rb