Class: Hyrax::Ingest::Fetcher::Base
- Inherits:
-
Object
- Object
- Hyrax::Ingest::Fetcher::Base
- Defined in:
- lib/hyrax/ingest/fetcher/base.rb
Instance Method Summary collapse
-
#fetch ⇒ Object
abstract
Subclasses should override this method with the logic required to fetch values from a SIP.
-
#initialize(options = {}) ⇒ Base
constructor
A new instance of Base.
-
#required? ⇒ Boolean
Boolean reader for @required.
Methods included from HasLogger
Methods included from HasReport
Constructor Details
#initialize(options = {}) ⇒ Base
Returns a new instance of Base.
28 29 30 |
# File 'lib/hyrax/ingest/fetcher/base.rb', line 28 def initialize(={}) @required = .delete(:required) end |
Instance Method Details
#fetch ⇒ Object
This method is abstract.
Subclasses should override this method with the logic required to fetch values from a SIP. The overidden method should set @fetched_value, and return it.
40 41 42 |
# File 'lib/hyrax/ingest/fetcher/base.rb', line 40 def fetch @fetched_value end |
#required? ⇒ Boolean
Boolean reader for @required.
33 |
# File 'lib/hyrax/ingest/fetcher/base.rb', line 33 def required?; !!@required; end |