Class: Hydra::RemoteIdentifier::Minter
- Inherits:
-
Object
- Object
- Hydra::RemoteIdentifier::Minter
- Defined in:
- lib/hydra/remote_identifier/minter.rb
Overview
The Minter is responsible for passing the target’s payload to the RemoteService then setting the target’s identifier based on the response from the remote_service
Instance Attribute Summary collapse
-
#service ⇒ Object
readonly
Returns the value of attribute service.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(service, target) ⇒ Minter
constructor
A new instance of Minter.
Constructor Details
#initialize(service, target) ⇒ Minter
Returns a new instance of Minter.
15 16 17 |
# File 'lib/hydra/remote_identifier/minter.rb', line 15 def initialize(service, target) @service, @target = service, target end |
Instance Attribute Details
#service ⇒ Object (readonly)
Returns the value of attribute service.
13 14 15 |
# File 'lib/hydra/remote_identifier/minter.rb', line 13 def service @service end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
13 14 15 |
# File 'lib/hydra/remote_identifier/minter.rb', line 13 def target @target end |
Class Method Details
.call(coordinator, target) ⇒ Object
9 10 11 |
# File 'lib/hydra/remote_identifier/minter.rb', line 9 def self.call(coordinator, target) new(coordinator, target).call end |
Instance Method Details
#call ⇒ Object
19 20 21 |
# File 'lib/hydra/remote_identifier/minter.rb', line 19 def call update_target(service.call(payload)) end |