def diff_from(time: nil, version: nil)
      raise ArgumentError, "Time or version must be specified" if time.nil? && version.nil?

      from_version = version.nil? ? find_by_time(time) : find_by_version(version)
      from_version ||= versions.first

      base = changes_to(version: from_version.version)
      diff = changes_to(version: self.version, data: base, from: from_version.version + 1)

      build_changes(base, diff)
    end
def diff_from(time: nil, version: nil)
      raise ArgumentError, "Time or version must be specified" if time.nil? && version.nil?

      from_version = version.nil? ? find_by_time(time) : find_by_version(version)
      from_version ||= versions.first

      base = changes_to(version: from_version.version)
      diff = changes_to(version: self.version, data: base, from: from_version.version + 1)

      build_changes(base, diff)
    end
Return diff object representing changes since specified time or version.

 @example

   diff_from(time: 2.days.ago)
   #=> { "id" => 1, "changes" => { "title" => { "old" => "Hello!", "new" => "World" } } }
 rubocop:disable Metrics/AbcSize