Class: Muwu::ManifestBuilder

Inherits:
Object
  • Object
show all
Includes:
Muwu
Defined in:
lib/muwu/manifest_builder/manifest_builder.rb

Constant Summary

Constants included from Muwu

GEM_HOME_LIB, GEM_HOME_LIB_MUWU, VERSION

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Muwu

debug, read

Constructor Details

#initializeManifestBuilder

Returns a new instance of ManifestBuilder.



21
22
23
# File 'lib/muwu/manifest_builder/manifest_builder.rb', line 21

def initialize
  @manifest = Manifest.new
end

Instance Attribute Details

#manifestObject

Returns the value of attribute manifest.



8
9
10
# File 'lib/muwu/manifest_builder/manifest_builder.rb', line 8

def manifest
  @manifest
end

#projectObject

Returns the value of attribute project.



8
9
10
# File 'lib/muwu/manifest_builder/manifest_builder.rb', line 8

def project
  @project
end

Class Method Details

.build {|builder| ... } ⇒ Object

Yields:

  • (builder)


14
15
16
17
18
# File 'lib/muwu/manifest_builder/manifest_builder.rb', line 14

def self.build
  builder = new
  yield(builder)
  builder.manifest
end

Instance Method Details

#build_from_project(project) ⇒ Object



26
27
28
29
30
# File 'lib/muwu/manifest_builder/manifest_builder.rb', line 26

def build_from_project(project)
  @project = project
  set_documents
  set_project
end

#set_documentsObject



33
34
35
# File 'lib/muwu/manifest_builder/manifest_builder.rb', line 33

def set_documents
  @manifest.documents = determine_documents
end

#set_projectObject



38
39
40
# File 'lib/muwu/manifest_builder/manifest_builder.rb', line 38

def set_project
  @manifest.project = @project
end