Sha256: 0583667226ae9d7dae6fb650ba0961f7ba35ea9a8a3e7a089001391c7adb3efa

Contents?: true

Size: 705 Bytes

Versions: 2

Compression:

Stored size: 705 Bytes

Contents

require_relative 'version_helpers'

module PaperTrailScrapbook
  # Class Chapter provides single version history analysis
  #
  # @author Timothy Chambers <tim@possibilogy.com>
  #
  class Chapter
    include Concord.new(:version)
    include Adamantium::Flat
    include PaperTrailScrapbook::VersionHelpers

    # Single version historical analysis
    #
    # @return [String] Human readable description of changes
    #
    def story
      updates = changes
      return unless create? || updates.present? || !config.filter_non_changes

      "#{preface}\n#{updates}"
    end

    private

    def preface
      "On #{whenn}, #{who} #{kind} the following #{model} info:".squeeze(' ')
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
paper_trail_scrapbook-0.1.8 lib/paper_trail_scrapbook/chapter.rb
paper_trail_scrapbook-0.1.7 lib/paper_trail_scrapbook/chapter.rb