Class: ROF::Ingesters::RelsExtIngester
- Inherits:
-
Object
- Object
- ROF::Ingesters::RelsExtIngester
- Defined in:
- lib/rof/ingesters/rels_ext_ingester.rb
Instance Attribute Summary collapse
-
#fdoc ⇒ Object
readonly
:models is a list of fedora content models this item has :item is the hash of the ROF item :fdoc is an optional fedora document to save to :pid is the namespaced identifier of this item.
-
#item ⇒ Object
readonly
:models is a list of fedora content models this item has :item is the hash of the ROF item :fdoc is an optional fedora document to save to :pid is the namespaced identifier of this item.
-
#models ⇒ Object
readonly
:models is a list of fedora content models this item has :item is the hash of the ROF item :fdoc is an optional fedora document to save to :pid is the namespaced identifier of this item.
-
#pid ⇒ Object
readonly
:models is a list of fedora content models this item has :item is the hash of the ROF item :fdoc is an optional fedora document to save to :pid is the namespaced identifier of this item.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(attributes = {}) ⇒ RelsExtIngester
constructor
A new instance of RelsExtIngester.
Constructor Details
#initialize(attributes = {}) ⇒ RelsExtIngester
Returns a new instance of RelsExtIngester.
17 18 19 20 21 22 |
# File 'lib/rof/ingesters/rels_ext_ingester.rb', line 17 def initialize(attributes = {}) @models = attributes.fetch(:models) @item = attributes.fetch(:item) @pid = item.fetch('pid') @fdoc = attributes.fetch(:fedora_document, nil) end |
Instance Attribute Details
#fdoc ⇒ Object (readonly)
:models is a list of fedora content models this item has :item is the hash of the ROF item :fdoc is an optional fedora document to save to :pid is the namespaced identifier of this item
16 17 18 |
# File 'lib/rof/ingesters/rels_ext_ingester.rb', line 16 def fdoc @fdoc end |
#item ⇒ Object (readonly)
:models is a list of fedora content models this item has :item is the hash of the ROF item :fdoc is an optional fedora document to save to :pid is the namespaced identifier of this item
16 17 18 |
# File 'lib/rof/ingesters/rels_ext_ingester.rb', line 16 def item @item end |
#models ⇒ Object (readonly)
:models is a list of fedora content models this item has :item is the hash of the ROF item :fdoc is an optional fedora document to save to :pid is the namespaced identifier of this item
16 17 18 |
# File 'lib/rof/ingesters/rels_ext_ingester.rb', line 16 def models @models end |
#pid ⇒ Object (readonly)
:models is a list of fedora content models this item has :item is the hash of the ROF item :fdoc is an optional fedora document to save to :pid is the namespaced identifier of this item
16 17 18 |
# File 'lib/rof/ingesters/rels_ext_ingester.rb', line 16 def pid @pid end |
Class Method Details
.call(attributes) ⇒ Object
8 9 10 |
# File 'lib/rof/ingesters/rels_ext_ingester.rb', line 8 def self.call(attributes) new(attributes).call end |
Instance Method Details
#call ⇒ Object
24 25 26 27 28 |
# File 'lib/rof/ingesters/rels_ext_ingester.rb', line 24 def call content = build_content persist(content) content end |