Sha256: d7413c2f67c0eb4bde070355d17209dc46db6d63b29d26c259c8fec3085af791

Contents?: true

Size: 427 Bytes

Versions: 50

Compression:

Stored size: 427 Bytes

Contents

require "cfoundry/baseclient"

require "cfoundry/v1/client"
require "cfoundry/v2/client"

module CFoundry
  class Client < BaseClient
    def self.new(*args)
      target, _ = args

      base = super(target)

      case base.info[:version]
      when 2
        CFoundry::V2::Client.new(*args)
      else
        CFoundry::V1::Client.new(*args)
      end
    end

    def info
      get("info", nil => :json)
    end
  end
end

Version data entries

50 entries across 50 versions & 2 rubygems

Version Path
cfoundry-0.3.9 lib/cfoundry/client.rb
cfoundry-0.3.8 lib/cfoundry/client.rb
cfoundry-0.3.7 lib/cfoundry/client.rb
cfoundry-0.3.6 lib/cfoundry/client.rb
cfoundry-0.3.5 lib/cfoundry/client.rb
cfoundry-0.3.4 lib/cfoundry/client.rb
cfoundry-0.3.3 lib/cfoundry/client.rb
cfoundry-0.3.2 lib/cfoundry/client.rb
cfoundry-0.3.1 lib/cfoundry/client.rb
cfoundry-0.3.0 lib/cfoundry/client.rb