Sha256: 245804a42e0ae5996d35aeb86989c9b04b2e2551fb168d5d6e5528ef7c55a5a4

Contents?: true

Size: 545 Bytes

Versions: 1

Compression:

Stored size: 545 Bytes

Contents

module Munge
  module Item
    class Virtual < Base
      def initialize(relpath, kontent, frontmatter = nil)
        content =
          if kontent.is_a?(String)
            Munge::Attribute::Content.new(kontent, frontmatter)
          else
            kontent
          end

        super(relpath, content)
      end

      def relpath
        @path
      end

      def virtual?
        true
      end

      def text?
        true
      end

      def content=(new_content)
        @content.content = new_content
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
munge-0.2.0 lib/munge/item/virtual.rb