def _add_common_methods(name, element_method, opts)
      default_method = opts.delete(:default_method)
      presence_method = opts.delete(:presence_method) || :present?

      define_method(name) do
        return default_method.call(name, self) if default_method.is_a?(Proc)

        default_method.nil? ? send(element_method) : send(element_method).send(default_method)
      end

      define_method("#{name}?") do
        return presence_method.call(name, self) if presence_method.is_a?(Proc)

        send(element_method).send(presence_method)
      end
    end
def _add_common_methods(name, element_method, opts)
      default_method = opts.delete(:default_method)
      presence_method = opts.delete(:presence_method) || :present?

      define_method(name) do
        return default_method.call(name, self) if default_method.is_a?(Proc)

        default_method.nil? ? send(element_method) : send(element_method).send(default_method)
      end

      define_method("#{name}?") do
        return presence_method.call(name, self) if presence_method.is_a?(Proc)

        send(element_method).send(presence_method)
      end
    end
Helper function to reduce perceived complexity of element