Class: OpenFeature::Flagd::Provider::ConfiguredClient

Inherits:
Object
  • Object
show all
Defined in:
lib/openfeature/flagd/provider.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name) ⇒ Object



47
48
49
50
51
52
53
# File 'lib/openfeature/flagd/provider.rb', line 47

def method_missing(method_name, ...)
  if client.respond_to?(method_name)
    client.send(method_name, ...)
  else
    super
  end
end

Instance Method Details

#configurationObject



59
60
61
62
63
# File 'lib/openfeature/flagd/provider.rb', line 59

def configuration
  @configuration ||= Configuration.default_config
    .merge(Configuration.environment_variables_config)
    .merge(explicit_configuration)
end

#configure(&block) ⇒ Object



65
66
67
68
69
# File 'lib/openfeature/flagd/provider.rb', line 65

def configure(&block)
  return unless block

  block.call(explicit_configuration)
end

#respond_to_missing?(method_name, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


55
56
57
# File 'lib/openfeature/flagd/provider.rb', line 55

def respond_to_missing?(method_name, include_private = false)
  client.respond_to?(method_name, include_private) || super
end