Public Instance methods
freeze()
Freeze the configured custom block results when freezing the app.
[show source]
# File lib/roda/plugins/custom_block_results.rb 49 def freeze 50 custom_block_results.freeze 51 super 52 end
handle_block_result(klass, &block)
Specify a block that will be called when an instance of klass is returned as a block result. The block defines a method.
[show source]
# File lib/roda/plugins/custom_block_results.rb 56 def handle_block_result(klass, &block) 57 custom_block_results[klass] = define_roda_method(custom_block_results[klass] || "custom_block_result_#{klass}", 1, &block) 58 end