Module: Yesterday::Model::InstanceMethods
- Defined in:
- lib/yesterday/model.rb
Instance Method Summary collapse
- #changesets ⇒ Object
- #diff_version(from_version_number, to_version_number) ⇒ Object
- #previous_version_number ⇒ Object
- #version(version_number) ⇒ Object
- #version_number ⇒ Object
Instance Method Details
#changesets ⇒ Object
71 72 73 |
# File 'lib/yesterday/model.rb', line 71 def changesets @changesets ||= Versioning.changesets_for(self) end |
#diff_version(from_version_number, to_version_number) ⇒ Object
88 89 90 91 92 |
# File 'lib/yesterday/model.rb', line 88 def diff_version(from_version_number, to_version_number) @diff_version ||= {} @diff_version[from_version_number] ||= {} @diff_version[from_version_number][to_version_number] ||= Versioning.diff_for(from_version_number, to_version_number, self) end |
#previous_version_number ⇒ Object
79 80 81 |
# File 'lib/yesterday/model.rb', line 79 def previous_version_number @previous_version_number ||= (version_number > 1 ? version_number - 1 : version_number) end |
#version(version_number) ⇒ Object
83 84 85 86 |
# File 'lib/yesterday/model.rb', line 83 def version(version_number) @version ||= {} @version[version_number] ||= Versioning.versioned_object_for(version_number, self) end |
#version_number ⇒ Object
75 76 77 |
# File 'lib/yesterday/model.rb', line 75 def version_number @version_number ||= Versioning.current_version_number_for(self) end |