Sha256: d21f3168c4f20e54d0368565521ee200c13112af2f9a3339e79482e4acde8643

Contents?: true

Size: 693 Bytes

Versions: 6

Compression:

Stored size: 693 Bytes

Contents

module AnswersEngine
  module Client
    class EnvVar < AnswersEngine::Client::Base

      def find(name)
        self.class.get("/env_vars/#{name}", @options)
      end

      def all(opts={})
        params = @options.merge opts
        self.class.get("/env_vars", params)
      end

      def set(name, value, opts={})
        body = {}
        body[:value] = value
        body[:secret] = opts[:secret] if opts[:secret]
        params = @options.merge({body: body.to_json})
        self.class.put("/env_vars/#{name}", params)
      end

      def unset(name, opts={})
        params = @options.merge(opts)
        self.class.delete("/env_vars/#{name}", params)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
answersengine-0.10.1 lib/answersengine/client/env_var.rb
answersengine-0.10.0 lib/answersengine/client/env_var.rb
answersengine-0.9.1 lib/answersengine/client/env_var.rb
answersengine-0.9.0 lib/answersengine/client/env_var.rb
answersengine-0.8.0 lib/answersengine/client/env_var.rb
answersengine-0.7.0 lib/answersengine/client/env_var.rb