lib/hirb/view.rb in cldwalker-hirb-0.1.0 vs lib/hirb/view.rb in cldwalker-hirb-0.1.1
- old
+ new
@@ -39,10 +39,11 @@
# This is the main method of this class. This method searches for the first formatter it can apply
# to the object in this order: local block, method option, class option. If a formatter is found it applies it to the object
# and returns true. Returns false if no formatter found.
# ==== Options:
# [:method] Specifies a global (Kernel) method to do the formatting.
- # [:class] Specifies a class to do the formatting, using its render() class method.
+ # [:class] Specifies a class to do the formatting, using its render() class method. The render() method's arguments are the output and
+ # an options hash.
# [:options] Options to pass the formatter method or class.
def render_output(output, options={}, &block)
if block && block.arity > 0
formatted_output = block.call(output)
render_method.call(formatted_output)