Class: FedoraMigrate::TargetConstructor
- Inherits:
-
Object
- Object
- FedoraMigrate::TargetConstructor
- Defined in:
- lib/fedora_migrate/target_constructor.rb
Instance Attribute Summary collapse
-
#candidates ⇒ Object
writeonly
Sets the attribute candidates.
-
#source ⇒ Object
Returns the value of attribute source.
-
#target ⇒ Object
Returns the value of attribute target.
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(source) ⇒ TargetConstructor
constructor
A new instance of TargetConstructor.
Constructor Details
#initialize(source) ⇒ TargetConstructor
Returns a new instance of TargetConstructor.
5 6 7 |
# File 'lib/fedora_migrate/target_constructor.rb', line 5 def initialize(source) @source = source end |
Instance Attribute Details
#candidates=(value) ⇒ Object
Sets the attribute candidates
3 4 5 |
# File 'lib/fedora_migrate/target_constructor.rb', line 3 def candidates=(value) @candidates = value end |
#source ⇒ Object
Returns the value of attribute source.
3 4 5 |
# File 'lib/fedora_migrate/target_constructor.rb', line 3 def source @source end |
#target ⇒ Object
Returns the value of attribute target.
3 4 5 |
# File 'lib/fedora_migrate/target_constructor.rb', line 3 def target @target end |
Instance Method Details
#build ⇒ Object
9 10 11 12 |
# File 'lib/fedora_migrate/target_constructor.rb', line 9 def build raise FedoraMigrate::Errors::MigrationError, "No qualified targets found in #{source.pid}" if target.nil? target.new(id: FedoraMigrate::Mover.id_component(source)) end |