Class: Hyrax::Ingest::Fetcher::RdfUri

Inherits:
Base
  • Object
show all
Defined in:
lib/hyrax/ingest/fetcher/rdf_uri.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 = {}) ⇒ RdfUri

Returns a new instance of RdfUri.



9
10
11
12
13
# File 'lib/hyrax/ingest/fetcher/rdf_uri.rb', line 9

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

Instance Attribute Details

#uri_strObject (readonly)

Returns the value of attribute uri_str.



7
8
9
# File 'lib/hyrax/ingest/fetcher/rdf_uri.rb', line 7

def uri_str
  @uri_str
end

Instance Method Details

#fetchObject



15
16
17
# File 'lib/hyrax/ingest/fetcher/rdf_uri.rb', line 15

def fetch
  @fetched_value ||= ::RDF::URI.new(uri_str)
end