Sha256: a3fdf71cd4d84563b6f788192ac5cbd97b86b6e26f26b1a3acdb7819f3f4d470

Contents?: true

Size: 640 Bytes

Versions: 2

Compression:

Stored size: 640 Bytes

Contents

module ConohaApi
  module Configurable

    attr_reader :api_endpoint
    attr_reader :tenant_id
    attr_reader :login
    attr_reader :password
    attr_reader :connection_options
    attr_reader :middleware
    attr_reader :proxy
    attr_reader :raise_error

    class << self
      def keys
        @keys || [
          :api_endpoint,
          :tenant_id,
          :login,
          :password,
          :connection_options,
          :middleware,
          :proxy,
          :raise_error,
        ]
      end
    end

    def configure
      yield
    end

    def api_endpoint
      File.join(@api_endpoint, "")
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
conoha_api-0.2.0 lib/conoha_api/configurable.rb
conoha_api-0.1.0 lib/conoha_api/configurable.rb