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.3189.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3146.6.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3184.1.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3184.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3146.5.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3181.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3178.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3146.4.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3146.3.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3177.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3173.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3146.2.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3146.1.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3169.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3167.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3165.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3163.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3160.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3157.0 lib/bosh/stemcell/agent.rb
bosh-stemcell-1.3156.0 lib/bosh/stemcell/agent.rb