Class: Revision::Publisher

Inherits:
Revision show all
Defined in:
lib/controlled_versioning/revision/publisher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ Publisher

Returns a new instance of Publisher.



4
5
6
7
# File 'lib/controlled_versioning/revision/publisher.rb', line 4

def initialize(version)
  @version = version
  @versionable = version.versionable
end

Instance Attribute Details

#versionObject (readonly)

Returns the value of attribute version.



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

def version
  @version
end

#versionableObject (readonly)

Returns the value of attribute versionable.



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

def versionable
  @versionable
end

Instance Method Details

#accept_revisionObject



9
10
11
12
# File 'lib/controlled_versioning/revision/publisher.rb', line 9

def accept_revision
  create_or_update_versionable
  update_version_children
end