Sha256: a4bf96d808f4d6b489696601bf74d52c304260062ab00f97d574c0b4ed1ecb8b

Contents?: true

Size: 457 Bytes

Versions: 1

Compression:

Stored size: 457 Bytes

Contents

require 'epubber/models/introduction'

module Epubber::Models
  module Concerns
    module HasIntroduction
      def introduction(&block)
        @introduction ||= nil
        return @introduction unless block_given?
        @introduction = Epubber::Models::Introduction.new
        yield @introduction
      end

      def contextified_introduction
        return nil if introduction.nil?
        return introduction.contextify
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
epubber-0.2.0 lib/epubber/models/concerns/has_introduction.rb