Class: Hyrax::Ingest::Fetcher::Base

Inherits:
Object
  • Object
show all
Includes:
HasLogger, HasReport, Interloper
Defined in:
lib/hyrax/ingest/fetcher/base.rb

Instance Method Summary collapse

Methods included from HasLogger

config, #logger, #logger=

Methods included from HasReport

#report, #report=

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(options={})
  @required = options.delete(:required)
end

Instance Method Details

#fetchObject

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.

See Also:



40
41
42
# File 'lib/hyrax/ingest/fetcher/base.rb', line 40

def fetch
  @fetched_value
end

#required?Boolean

Boolean reader for @required.

Returns:

  • (Boolean)


33
# File 'lib/hyrax/ingest/fetcher/base.rb', line 33

def required?; !!@required; end