Class: Hyrax::Ingest::Fetcher::Literal

Inherits:
Base
  • Object
show all
Defined in:
lib/hyrax/ingest/fetcher/literal.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#required?

Methods included from HasLogger

config, #logger, #logger=

Methods included from HasReport

#report, #report=

Constructor Details

#initialize(options = {}) ⇒ Literal

Returns a new instance of Literal.



12
13
14
15
16
# File 'lib/hyrax/ingest/fetcher/literal.rb', line 12

def initialize(options={})
  options = { value: options } unless options.is_a? Hash
  @literal_value = options.delete(:value)
  super
end

Instance Attribute Details

#literal_valueObject (readonly)

Returns the value of attribute literal_value.



8
9
10
# File 'lib/hyrax/ingest/fetcher/literal.rb', line 8

def literal_value
  @literal_value
end

Instance Method Details

#fetchObject



18
19
20
# File 'lib/hyrax/ingest/fetcher/literal.rb', line 18

def fetch
  @fetched_value = literal_value
end