Class: Orcid::Remote::Service
- Inherits:
-
Object
- Object
- Orcid::Remote::Service
- Defined in:
- app/services/orcid/remote/service.rb
Direct Known Subclasses
Instance Method Summary collapse
- #call ⇒ Object
- #callback(name, *args) ⇒ Object
-
#initialize {|@callbacks| ... } ⇒ Service
constructor
A new instance of Service.
Constructor Details
#initialize {|@callbacks| ... } ⇒ Service
Returns a new instance of Service.
4 5 6 7 |
# File 'app/services/orcid/remote/service.rb', line 4 def initialize @callbacks = Orcid::NamedCallbacks.new yield(@callbacks) if block_given? end |
Instance Method Details
#call ⇒ Object
9 10 11 |
# File 'app/services/orcid/remote/service.rb', line 9 def call raise NotImplementedError.new("Define #{self.class}#call") end |
#callback(name, *args) ⇒ Object
13 14 15 16 |
# File 'app/services/orcid/remote/service.rb', line 13 def callback(name, *args) @callbacks.call(name, *args) args end |