method
new
v6.0.0 -
Show latest stable
- Class:
ActionText::Content
new(content = nil, options = {})public
No documentation available.
# File actiontext/lib/action_text/content.rb, line 23
def initialize(content = nil, options = {})
options.with_defaults! canonicalize: true
if options[:canonicalize]
@fragment = self.class.fragment_by_canonicalizing_content(content)
else
@fragment = ActionText::Fragment.wrap(content)
end
end