Sha256: 87d7cf1f092ebcf43cd8ad5c17c1d9949c6eecba6a00bf9b3f133aef8a1b82cf

Contents?: true

Size: 664 Bytes

Versions: 47

Compression:

Stored size: 664 Bytes

Contents

module Bosh::Stemcell
  module Agent
    def self.for(name)
      case name
        when 'go'
          Go.new
        when 'ruby'
          Ruby.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

    class Ruby
      def name
        'ruby'
      end

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

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
bosh-stemcell-1.2539.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2537.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2534.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2531.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2524.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2513.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2479.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2448.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2446.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2427.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2416.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2411.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2409.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2398.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2384.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2375.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2372.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2366.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2361.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2355.0 lib/bosh/stemcell/agent.rb