I had some nice helper method three_columns in my ApplicationHelper which I want to separate now into its own class to prevent naming collisions.

# In my ApplicationHelper I have this:
def three_columns(&block)
ThreeColumns.new(&block)
end
# And in a separate file:
class ThreeColumns
include ActionView::Context
include ActionView::Helpers::TagHelper
def initialize(&block)
content_tag(:div, class: :three_columns) do
capture(self, &block)
end
end
end

I want to use this like <%= three_columns { .. } %>, but I'm getting this error: