class Roda::RodaPlugins::Rodauth::Feature
def self.define(name, &block)
def self.define(name, &block) feature = new feature.dependencies = [] feature.feature_name = name feature.module_eval(&block) FEATURES[name] = feature end
def account_required?
def account_required? @account_required end
def additional_form_tags
def additional_form_tags meth = :"#{feature_name}_additional_form_tags" define_method(meth) do nil end auth_value_methods meth end
def after
def after meth = :"after_#{feature_name}" define_method(meth) do nil end auth_methods meth end
def depends(*deps)
def depends(*deps) dependencies.concat(deps) end
def redirect(&block)
def redirect(&block) meth = :"#{feature_name}_redirect" block ||= DEFAULT_REDIRECT_BLOCK define_method(meth, &block) auth_value_methods meth end
def require_account
def require_account @account_required = true end
def view(page, title)
def view(page, title) meth = :"#{feature_name}_view" define_method(meth) do view(page, title) end auth_methods meth end