Sha256: 8aa9af035a92a0fb14172613a70e26f80c1bf916c07b260c1bfd8aabbacc55e3

Contents?: true

Size: 587 Bytes

Versions: 2

Compression:

Stored size: 587 Bytes

Contents

# encoding: UTF-8

module Bunto
  module Drops
    class DocumentDrop < Drop
      extend Forwardable

      mutable false

      def_delegator :@obj, :next_doc, :next
      def_delegator :@obj, :previous_doc, :previous
      def_delegator :@obj, :relative_path, :path
      def_delegators :@obj, :id, :output, :content, :to_s, :relative_path, :url

      def collection
        @obj.collection.label
      end

      def excerpt
        fallback_data['excerpt'].to_s
      end

      private
      def_delegator :@obj, :data, :fallback_data
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bunto-2.0.0.pre lib/bunto/drops/document_drop.rb
bunto-1.0.0 lib/bunto/drops/document_drop.rb