blob: 57b08eb52272c0ebbd3c32218777e0e4edccfae8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
class HTMLElement
attr_reader :content, :options, :tag_name
def initialize(tag_name, content = nil, options = nil)
@tag_name = tag_name
@content = content
@options = options
end
def to_html(options = {})
ApplicationController.helpers.content_tag(
@tag_name,
@content,
@options.merge(options)
)
end
end
|