class Prismic::Fragments::Multiple

Attributes

fragments[R]

Public Class Methods

new(fragments=[]) click to toggle source
# File lib/prismic/fragments/multiple.rb, line 7
def initialize(fragments=[])
  @fragments = fragments
end

Public Instance Methods

[](i) click to toggle source
# File lib/prismic/fragments/multiple.rb, line 15
def [](i)
  @fragments[i]
end
as_html(link_resolver) click to toggle source
# File lib/prismic/fragments/multiple.rb, line 23
def as_html(link_resolver)
  @fragments.map { |f| f.as_html(link_resolver) }.join
end
length()
Alias for: size
push(fragment) click to toggle source
# File lib/prismic/fragments/multiple.rb, line 19
def push(fragment)
  @fragments.push(fragment)
end
size() click to toggle source
# File lib/prismic/fragments/multiple.rb, line 11
def size
  @fragments.size
end
Also aliased as: length