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.
14 15 16 |
# File 'lib/hydra/remote_identifier/minter.rb', line 14 def initialize(service, target) @service, @target = service, target end |
Instance Attribute Details
#service ⇒ Object (readonly)
Returns the value of attribute service.
12 13 14 |
# File 'lib/hydra/remote_identifier/minter.rb', line 12 def service @service end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
12 13 14 |
# File 'lib/hydra/remote_identifier/minter.rb', line 12 def target @target end |
Class Method Details
.call(coordinator, target) ⇒ Object
8 9 10 |
# File 'lib/hydra/remote_identifier/minter.rb', line 8 def self.call(coordinator, target) new(coordinator, target).call end |
Instance Method Details
#call ⇒ Object
18 19 20 |
# File 'lib/hydra/remote_identifier/minter.rb', line 18 def call update_target(service.call(payload)) end |