Skip to content

Instantly share code, notes, and snippets.

@dcolthorp
Created September 24, 2008 04:04
Show Gist options
  • Select an option

  • Save dcolthorp/12474 to your computer and use it in GitHub Desktop.

Select an option

Save dcolthorp/12474 to your computer and use it in GitHub Desktop.
def capture(*args, &block)
ret = ""
captured = send("capture_#{@_template}", *args) do
ret = block.call
end
if captured.blank?
ret
else
captured
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment