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



183
184
185
186
# File 'lib/seahorse/client/configuration.rb', line 183

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.



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

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

Instance Method Details

#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.



188
189
190
# File 'lib/seahorse/client/configuration.rb', line 188

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)


192
193
194
# File 'lib/seahorse/client/configuration.rb', line 192

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