Module: Roda::RodaPlugins::AutoForme
- Defined in:
- lib/roda/plugins/autoforme.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Class Method Summary collapse
-
.configure(app, opts = {}, &block) ⇒ Object
If a block is given, automatically setup AutoForme using the options and block.
-
.load_dependencies(app, opts = {}) ⇒ Object
Require the render plugin, since it is required.
Class Method Details
.configure(app, opts = {}, &block) ⇒ Object
If a block is given, automatically setup AutoForme using the options and block.
13 14 15 16 17 18 19 20 |
# File 'lib/roda/plugins/autoforme.rb', line 13 def self.configure(app, opts={}, &block) app.instance_exec do @autoforme_routes ||= {} if block autoforme(opts, &block) end end end |
.load_dependencies(app, opts = {}) ⇒ Object
Require the render plugin, since it is required.
7 8 9 |
# File 'lib/roda/plugins/autoforme.rb', line 7 def self.load_dependencies(app, opts={}) app.plugin :render end |