Public Instance methods
freeze()
Freeze the configured custom block results when freezing the app.
[show source]
# File lib/roda/plugins/custom_block_results.rb 50 def freeze 51 custom_block_results.freeze 52 super 53 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 57 def handle_block_result(klass, &block) 58 custom_block_results[klass] = define_roda_method(custom_block_results[klass] || "custom_block_result_#{klass}", 1, &block) 59 end