Sha256: b3643162367823eea93630185cb8b3dc767b037514544a9d5c99d400db809d76

Contents?: true

Size: 369 Bytes

Versions: 9

Compression:

Stored size: 369 Bytes

Contents

class Revision < Version

  private
  def versionable_changed_attributes
    versionable.changed_attributes
  end

  def versionable_changes(key)
    values = versionable.changes[key]
    ValueChange.new(values[0], values[1])
  end

  def previous_value(key)
    versionable_changes(key).previous_value
  end

  ValueChange = Struct.new(:previous_value, :new_value)
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
rubber_stamp-0.15.1 lib/rubber_stamp/revision.rb
rubber_stamp-0.13.0 lib/rubber_stamp/revision.rb
controlled_versioning-0.12.0 lib/controlled_versioning/revision.rb
controlled_versioning-0.11.0 lib/controlled_versioning/revision.rb
controlled_versioning-0.10.0 lib/controlled_versioning/revision.rb
controlled_versioning-0.9.2 lib/controlled_versioning/revision.rb
controlled_versioning-0.9.1 lib/controlled_versioning/revision.rb
controlled_versioning-0.9.0 lib/controlled_versioning/revision.rb
controlled_versioning-0.8.0 lib/controlled_versioning/revision.rb