Module: Roda::RodaPlugins::AutoForme

Defined in:
lib/roda/plugins/autoforme.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Class Method Summary collapse

Class Method Details

.configure(app, opts = {}, &block) ⇒ Object

If a block is given, automatically setup AutoForme using the options and block.



15
16
17
18
19
20
21
22
# File 'lib/roda/plugins/autoforme.rb', line 15

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.



9
10
11
# File 'lib/roda/plugins/autoforme.rb', line 9

def self.load_dependencies(app, opts={})
  app.plugin :render
end