module Gapic::Config

def create_getter name_ivar, name, default

def create_getter name_ivar, name, default
  define_method name do
    return instance_variable_get name_ivar if instance_variable_defined? name_ivar
    if instance_variable_defined? :@parent_config
      parent = instance_variable_get :@parent_config
      return parent.__send__ name if parent.respond_to? name
    end
    default
  end
end