Class: ChangeTracker

Inherits:
Version show all
Defined in:
lib/controlled_versioning/change_tracker.rb

Direct Known Subclasses

Child

Defined Under Namespace

Classes: Attribute, Child

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ ChangeTracker

Returns a new instance of ChangeTracker.



4
5
6
# File 'lib/controlled_versioning/change_tracker.rb', line 4

def initialize(version)
  @version = version
end

Instance Attribute Details

#versionObject (readonly)

Returns the value of attribute version.



3
4
5
# File 'lib/controlled_versioning/change_tracker.rb', line 3

def version
  @version
end

Instance Method Details

#allObject



8
9
10
# File 'lib/controlled_versioning/change_tracker.rb', line 8

def all
  attributes + children
end

#attributesObject



12
13
14
# File 'lib/controlled_versioning/change_tracker.rb', line 12

def attributes
  version_attributes.collect{ |attr| ChangeTracker::Attribute.new(attr) }
end

#childrenObject



16
17
18
# File 'lib/controlled_versioning/change_tracker.rb', line 16

def children
  version_children.collect{ |child| ChangeTracker::Child.new(child) }
end