/
action_text.rb
59 lines (48 loc) · 1.38 KB
/
action_text.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# frozen_string_literal: true
require "active_support"
require "active_support/rails"
require "action_text/version"
require "action_text/deprecator"
require "nokogiri"
# :markup: markdown
# :include: ../README.md
module ActionText
extend ActiveSupport::Autoload
autoload :Attachable
autoload :AttachmentGallery
autoload :Attachment
autoload :Attribute
autoload :Content
autoload :Encryption
autoload :Fragment
autoload :FixtureSet
autoload :HtmlConversion
autoload :PlainTextConversion
autoload :Rendering
autoload :Serialization
autoload :TrixAttachment
module Attachables
extend ActiveSupport::Autoload
autoload :ContentAttachment
autoload :MissingAttachable
autoload :RemoteImage
end
module Attachments
extend ActiveSupport::Autoload
autoload :Caching
autoload :Minification
autoload :TrixConversion
end
class << self
def html_document_class
return @html_document_class if defined?(@html_document_class)
@html_document_class =
defined?(Nokogiri::HTML5) ? Nokogiri::HTML5::Document : Nokogiri::HTML4::Document
end
def html_document_fragment_class
return @html_document_fragment_class if defined?(@html_document_fragment_class)
@html_document_fragment_class =
defined?(Nokogiri::HTML5) ? Nokogiri::HTML5::DocumentFragment : Nokogiri::HTML4::DocumentFragment
end
end
end