class method
self.new
Ruby on Rails 6.0.6
Since v6.0.6Signature
self.new(content = nil, options = {})
No documentation comment.
Parameters
-
contentopt = nil -
optionsopt = {}
Source
# File actiontext/lib/action_text/content.rb, line 19
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
Defined in actiontext/lib/action_text/content.rb line 19
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionText::Content