Class: Seahorse::Client::Configuration::DefaultResolver Private

Inherits:
Object
  • Object
show all
Defined in:
lib/seahorse/client/configuration.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Constructor Details

#initialize(struct) ⇒ DefaultResolver

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of DefaultResolver.



185
186
187
188
# File 'lib/seahorse/client/configuration.rb', line 185

def initialize(struct)
  @struct = struct
  @members = Set.new(@struct.members)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name, *args) ⇒ Object (private)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



222
223
224
225
226
227
228
# File 'lib/seahorse/client/configuration.rb', line 222

def method_missing(method_name, *args)
  if @members.include?(method_name)
    value_at(method_name)
  else
    super
  end
end

Instance Method Details

#override_config(k, v) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



198
199
200
# File 'lib/seahorse/client/configuration.rb', line 198

def override_config(k, v)
  @struct[k] = v
end

#resolveObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



190
191
192
# File 'lib/seahorse/client/configuration.rb', line 190

def resolve
  @members.each { |opt_name| value_at(opt_name) }
end

#respond_to?(method_name, *args) ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


194
195
196
# File 'lib/seahorse/client/configuration.rb', line 194

def respond_to?(method_name, *args)
  @members.include?(method_name) or super
end