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.3155.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3153.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3149.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3148.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3147.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3146.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3145.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3144.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3143.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3142.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3140.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3139.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3138.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3137.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3130.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3126.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3125.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3123.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3122.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3120.0 lib/bosh/stemcell/agent.rb