Module: Rodauth::ClassMethods
- Defined in:
- lib/rodauth.rb
Instance Method Summary collapse
Instance Method Details
#freeze ⇒ Object
441 442 443 444 445 |
# File 'lib/rodauth.rb', line 441 def freeze opts[:rodauths].each_value(&:freeze) opts[:rodauths].freeze super end |
#precompile_rodauth_templates ⇒ Object
425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 |
# File 'lib/rodauth.rb', line 425 def precompile_rodauth_templates instance = allocate rodauth = instance.rodauth view_opts = rodauth.send(:loaded_templates).map do |page| rodauth.send(:_view_opts, page) end view_opts << rodauth.send(:button_opts, '', {}) view_opts.each do |opts| instance.send(:retrieve_template, opts).send(:compiled_method, opts[:locals].keys.sort_by(&:to_s)) end nil end |
#rodauth(name = nil) ⇒ Object
421 422 423 |
# File 'lib/rodauth.rb', line 421 def rodauth(name=nil) opts[:rodauths][name] end |