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.2652.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2641.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2640.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2624.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2619.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2611.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2606.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2605.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2603.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2597.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2596.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2583.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2579.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2578.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2577.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2576.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2560.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2559.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2549.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2546.0 lib/bosh/stemcell/agent.rb