Sha256: 17e543e4d3a318fd56a3426c90eec89f8fc911003def12cccfa5f5febc649b82

Contents?: true

Size: 631 Bytes

Versions: 23

Compression:

Stored size: 631 Bytes

Contents

module CiteProc
  module Ruby

    class Renderer

      # @param item [CiteProc::CitationItem]
      # @param node [CSL::Style::Group]
      # @return [String]
      def render_group(item, node)
        return '' unless node.has_children?

        observer = ItemObserver.new(item.data)
        observer.start

        begin
          rendition = node.each_child.map { |child|
            render item, child
          }.reject(&:empty?)

          rendition = join(rendition, node.delimiter)

        ensure
          observer.stop
        end

        return '' if observer.skip?

        rendition
      end

    end

  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
citeproc-ruby-2.1.0 lib/citeproc/ruby/renderer/group.rb
citeproc-ruby-2.0.0 lib/citeproc/ruby/renderer/group.rb
citeproc-ruby-1.1.14 lib/citeproc/ruby/renderer/group.rb
citeproc-ruby-1.1.13 lib/citeproc/ruby/renderer/group.rb
citeproc-ruby-1.1.12 lib/citeproc/ruby/renderer/group.rb
citeproc-ruby-1.1.11 lib/citeproc/ruby/renderer/group.rb
citeproc-ruby-1.1.10 lib/citeproc/ruby/renderer/group.rb
citeproc-ruby-1.1.8 lib/citeproc/ruby/renderer/group.rb
citeproc-ruby-1.1.7 lib/citeproc/ruby/renderer/group.rb
citeproc-ruby-1.1.6 lib/citeproc/ruby/renderer/group.rb
citeproc-ruby-1.1.5 lib/citeproc/ruby/renderer/group.rb
citeproc-ruby-1.1.4 lib/citeproc/ruby/renderer/group.rb
citeproc-ruby-1.1.3 lib/citeproc/ruby/renderer/group.rb
citeproc-ruby-1.1.2 lib/citeproc/ruby/renderer/group.rb
citeproc-ruby-1.1.1 lib/citeproc/ruby/renderer/group.rb
citeproc-ruby-1.1.0 lib/citeproc/ruby/renderer/group.rb
citeproc-ruby-1.0.6 lib/citeproc/ruby/renderer/group.rb
citeproc-ruby-1.0.5 lib/citeproc/ruby/renderer/group.rb
citeproc-ruby-1.0.4 lib/citeproc/ruby/renderer/group.rb
citeproc-ruby-1.0.3 lib/citeproc/ruby/renderer/group.rb