lib/paper_trail_scrapbook/life_history.rb
# Retries textual historical analysis of versions
#
# @return [String] analyzed versions
#
Retries textual historical analysis of versions
Retries textual historical analysis of versions
def story
      x = versions.map do |v|
        if primary?(v)
          Chapter
        else
          SecondaryChapter
        end.new(v).story
      end.compact
      x.reverse! if PaperTrailScrapbook.config.recent_first
      case PaperTrailScrapbook.config.format
      when :json
        x
      when :markdown
        x.join("\n\n")
      else
        PaperTrailScrapbook.logger.debug("Unknown formatting #{PaperTrailScrapbook.config.format} default to :markdown")
        x.join("\n\n")
      end
    end
def story x = versions . map do | v | if primary? ( v ) Chapter else SecondaryChapter end . new ( v ) . story end . compact x . reverse! if PaperTrailScrapbook . config . recent_first case PaperTrailScrapbook . config . format when :json x when :markdown x . join ( "\n\n" ) else PaperTrailScrapbook . logger . debug ( "Unknown formatting #{PaperTrailScrapbook.config.format} default to :markdown" ) x . join ( "\n\n" ) end end
Retries textual historical analysis of versions
Retries textual historical analysis of versions
# Return the Array of changes for JSON packaging
None
String