class Rancher::Client
Constants
- CONVENIENCE_HEADERS
Header keys that can be passed in options hash to {#get},{#head}
Attributes
types[R]
Public Class Methods
new(options = {})
click to toggle source
# File lib/rancher/client.rb, line 20 def initialize(options = {}) # Use options passed in, but fall back to module defaults @types = {} Rancher::Configurable.keys.each do |key| instance_variable_set( :"@#{key}", options[key] || Rancher.instance_variable_get(:"@#{key}") ) end load_schema end
Public Instance Methods
access_key=(value)
click to toggle source
inspect()
click to toggle source
Text representation of the client, masking tokens and passwords
@return [String]
Calls superclass method
# File lib/rancher/client.rb, line 44 def inspect inspected = super if @secret_key inspected = inspected.gsub! @secret_key, "#{'*'*36}#{@secret_key[36..-1]}" end inspected end
load_schema()
click to toggle source
# File lib/rancher/client.rb, line 33 def load_schema response = get 'schema' response.each do |res| @types[res.get_id.to_sym] = Rancher::Type.new(res) end if response.is_a?(Rancher::Collection) end
method_missing(method_name, *args, &block)
click to toggle source
Calls superclass method
# File lib/rancher/client.rb, line 74 def method_missing(method_name, *args, &block) return @types[method_name] if respond_to?(method_name) super end
respond_to_missing?(method_name, _include_private = false)
click to toggle source
# File lib/rancher/client.rb, line 70 def respond_to_missing?(method_name, _include_private = false) (@types.key?(method_name)) end