Class: Muwu::ManifestTaskBuilders::MetadataBuilder
- Inherits:
-
Object
- Object
- Muwu::ManifestTaskBuilders::MetadataBuilder
show all
- Includes:
- Muwu, Helper
- Defined in:
- lib/muwu/manifest_task_builder/metadata_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
Returns a new instance of MetadataBuilder.
25
26
27
|
# File 'lib/muwu/manifest_task_builder/metadata_builder.rb', line 25
def initialize
@task = ManifestTask::Metadata.new
end
|
Instance Attribute Details
Returns the value of attribute outline_fragment_metadata.
10
11
12
|
# File 'lib/muwu/manifest_task_builder/metadata_builder.rb', line 10
def outline_fragment_metadata
@outline_fragment_metadata
end
|
#parent_document ⇒ Object
Returns the value of attribute parent_document.
10
11
12
|
# File 'lib/muwu/manifest_task_builder/metadata_builder.rb', line 10
def parent_document
@parent_document
end
|
#project ⇒ Object
Returns the value of attribute project.
10
11
12
|
# File 'lib/muwu/manifest_task_builder/metadata_builder.rb', line 10
def project
@project
end
|
#task ⇒ Object
Returns the value of attribute task.
10
11
12
|
# File 'lib/muwu/manifest_task_builder/metadata_builder.rb', line 10
def task
@task
end
|
Class Method Details
.build {|builder| ... } ⇒ Object
18
19
20
21
22
|
# File 'lib/muwu/manifest_task_builder/metadata_builder.rb', line 18
def self.build
builder = new
yield(builder)
builder.task
end
|
Instance Method Details
#build_from_outline(outline_fragment_metadata, parent_document) ⇒ Object
30
31
32
33
34
35
36
37
38
39
40
|
# File 'lib/muwu/manifest_task_builder/metadata_builder.rb', line 30
def build_from_outline(outline_fragment_metadata, parent_document)
@destination = parent_document.destination
@outline_fragment_metadata = outline_fragment_metadata
@parent_document = parent_document
@project = parent_document.project
phase_1_set_parent
phase_1_set_project
phase_2_set_destination
phase_2_set_metadata
phase_3_validate_metadata_values_exist
end
|
#phase_1_set_parent ⇒ Object
43
44
45
|
# File 'lib/muwu/manifest_task_builder/metadata_builder.rb', line 43
def phase_1_set_parent
@task.parent_document = @parent_document
end
|
#phase_1_set_project ⇒ Object
48
49
50
|
# File 'lib/muwu/manifest_task_builder/metadata_builder.rb', line 48
def phase_1_set_project
@task.project = @project
end
|
#phase_2_set_destination ⇒ Object
53
54
55
|
# File 'lib/muwu/manifest_task_builder/metadata_builder.rb', line 53
def phase_2_set_destination
@task.destination = @destination
end
|
58
59
60
|
# File 'lib/muwu/manifest_task_builder/metadata_builder.rb', line 58
def phase_2_set_metadata
@task.metadata = determine_metadata
end
|