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.3262.24.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3232.24.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3232.14.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3262.4.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3262.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3232.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3215.4.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3215.3.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3215.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3146.10.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3213.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3202.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3200.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3146.9.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3197.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3196.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3146.8.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3192.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3146.7.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3191.0 lib/bosh/stemcell/agent.rb