Class: InitialVersion::Factory

Inherits:
InitialVersion show all
Defined in:
lib/controlled_versioning/initial_version/factory.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Factory

Returns a new instance of Factory.



4
5
6
7
# File 'lib/controlled_versioning/initial_version/factory.rb', line 4

def initialize(args)
  @versionable = args[:versionable]
  @version = args[:version]
end

Instance Attribute Details

#versionObject (readonly)

Returns the value of attribute version.



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

def version
  @version
end

#versionableObject (readonly)

Returns the value of attribute versionable.



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

def versionable
  @versionable
end

Instance Method Details

#buildObject



9
10
11
12
13
# File 'lib/controlled_versioning/initial_version/factory.rb', line 9

def build
  build_version_attributes
  build_children
  version
end