edge badge
Methods
A
F
I
N
S
Included Modules
Attributes
[R] node
Class Public methods
fragment_by_canonicalizing_attachment_galleries(content)
# File actiontext/lib/action_text/attachment_gallery.rb, line 8
def fragment_by_canonicalizing_attachment_galleries(content)
  fragment_by_replacing_attachment_gallery_nodes(content) do |node|
    "<#{TAG_NAME}>#{node.inner_html}</#{TAG_NAME}>"
  end
end
from_node(node)
# File actiontext/lib/action_text/attachment_gallery.rb, line 34
def from_node(node)
  new(node)
end
new(node)
# File actiontext/lib/action_text/attachment_gallery.rb, line 41
def initialize(node)
  @node = node
end
Instance Public methods
attachments()
# File actiontext/lib/action_text/attachment_gallery.rb, line 45
def attachments
  @attachments ||= node.css(ATTACHMENT_SELECTOR).map do |node|
    ActionText::Attachment.from_node(node).with_full_attributes
  end
end
inspect()
# File actiontext/lib/action_text/attachment_gallery.rb, line 55
def inspect
  "#<#{self.class.name} size=#{size.inspect}>"
end
size()
# File actiontext/lib/action_text/attachment_gallery.rb, line 51
def size
  attachments.size
end