Class: PaperTrailScrapbook::Chapter Private

Inherits:
Object
  • Object
show all
Includes:
Adamantium::Flat, VersionHelpers
Defined in:
lib/paper_trail_scrapbook/chapter.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Class Chapter provides single version history analysis

Author:

Direct Known Subclasses

SecondaryChapter

Instance Method Summary collapse

Methods included from VersionHelpers

#changes, #config, #create?, #destroy?, #kind, #model, #model_id, #whenn, #who, #whodunnit_class, #whodunnit_instance

Instance Method Details

#storyString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Single version historical analysis

Returns:

  • (String)

    Human readable description of changes



19
20
21
22
23
24
# File 'lib/paper_trail_scrapbook/chapter.rb', line 19

def story
  updates = changes
  return unless tell_story?(updates)

  [preface, (updates unless destroy?)].compact.join("\n")
end