Sha256: 73cc3b25b0a4eb5a4c1b40a2c1beb05654a8cbf5d5832a6d3fd05f26d59ebc0e

Contents?: true

Size: 493 Bytes

Versions: 16

Compression:

Stored size: 493 Bytes

Contents

module Bosh::Stemcell
  module Agent
    def self.for(name)
      case name
        when 'go'
          Go.new
        when 'ruby'
          Ruby.new
        else
          raise ArgumentError.new("invalid agent: #{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

16 entries across 16 versions & 1 rubygems

Version Path
bosh-stemcell-1.2175.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2168.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2131.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2129.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2124.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2121.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2089.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2086.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2068.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2063.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.2005.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.1975.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.1868.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.1858.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.1840.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.1836.0 lib/bosh/stemcell/agent.rb