Class: Revision::Auditor
- Defined in:
- lib/controlled_versioning/revision/auditor.rb
Instance Attribute Summary collapse
-
#versionable ⇒ Object
readonly
Returns the value of attribute versionable.
Instance Method Summary collapse
- #changes_original? ⇒ Boolean
-
#initialize(versionable) ⇒ Auditor
constructor
A new instance of Auditor.
Constructor Details
#initialize(versionable) ⇒ Auditor
Returns a new instance of Auditor.
4 5 6 |
# File 'lib/controlled_versioning/revision/auditor.rb', line 4 def initialize(versionable) @versionable = versionable end |
Instance Attribute Details
#versionable ⇒ Object (readonly)
Returns the value of attribute versionable.
3 4 5 |
# File 'lib/controlled_versioning/revision/auditor.rb', line 3 def versionable @versionable end |
Instance Method Details
#changes_original? ⇒ Boolean
8 9 10 11 12 13 |
# File 'lib/controlled_versioning/revision/auditor.rb', line 8 def changes_original? return true if versionable.marked_for_destruction? return true if changes_at_least_one_attribute? return true if changes_at_least_one_nested_association? return false end |