Class: Hydra::RemoteIdentifier::MintingCoordinator
- Inherits:
-
Object
- Object
- Hydra::RemoteIdentifier::MintingCoordinator
- Defined in:
- lib/hydra/remote_identifier/minting_coordinator.rb
Overview
The Minting
Instance Attribute Summary collapse
-
#mapper ⇒ Object
readonly
Returns the value of attribute mapper.
-
#remote_service ⇒ Object
readonly
Returns the value of attribute remote_service.
Instance Method Summary collapse
-
#call(target, minter = Minter) ⇒ Object
Responsible for passing attributes from the target, as per the map, to the service and assigning the result of the service to the target, as per the map.
-
#initialize(remote_service, mapper_builder = Mapper, &map_config) ⇒ MintingCoordinator
constructor
A new instance of MintingCoordinator.
Constructor Details
#initialize(remote_service, mapper_builder = Mapper, &map_config) ⇒ MintingCoordinator
Returns a new instance of MintingCoordinator.
9 10 11 12 |
# File 'lib/hydra/remote_identifier/minting_coordinator.rb', line 9 def initialize(remote_service, mapper_builder = Mapper, &map_config) @remote_service = remote_service @mapper = mapper_builder.new(remote_service, &map_config) end |
Instance Attribute Details
#mapper ⇒ Object (readonly)
Returns the value of attribute mapper.
8 9 10 |
# File 'lib/hydra/remote_identifier/minting_coordinator.rb', line 8 def mapper @mapper end |
#remote_service ⇒ Object (readonly)
Returns the value of attribute remote_service.
8 9 10 |
# File 'lib/hydra/remote_identifier/minting_coordinator.rb', line 8 def remote_service @remote_service end |
Instance Method Details
#call(target, minter = Minter) ⇒ Object
Responsible for passing attributes from the target, as per the map, to the service and assigning the result of the service to the target, as per the map.
17 18 19 |
# File 'lib/hydra/remote_identifier/minting_coordinator.rb', line 17 def call(target, minter = Minter) minter.call(remote_service, wrap(target)) end |