Class: Arclight::Parent
- Inherits:
-
Object
- Object
- Arclight::Parent
- Defined in:
- app/models/arclight/parent.rb
Overview
Logic containing information about Solr_Ead “Parent” github.com/awead/solr_ead/blob/8cf7ffaa66e0e4c9c0b12f5646d6c2e20984cd99/lib/solr_ead/behaviors.rb#L54-L57
Instance Attribute Summary collapse
-
#eadid ⇒ Object
readonly
Returns the value of attribute eadid.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#level ⇒ Object
readonly
Returns the value of attribute level.
Instance Method Summary collapse
-
#global_id ⇒ String
Concatenates the eadid and the id, to return an “id” in the context of Blacklight and Solr.
-
#initialize(id:, label:, eadid:, level:) ⇒ Parent
constructor
A new instance of Parent.
Constructor Details
#initialize(id:, label:, eadid:, level:) ⇒ Parent
Returns a new instance of Parent.
9 10 11 12 13 14 |
# File 'app/models/arclight/parent.rb', line 9 def initialize(id:, label:, eadid:, level:) @id = id @label = label @eadid = eadid @level = level end |
Instance Attribute Details
#eadid ⇒ Object (readonly)
Returns the value of attribute eadid.
8 9 10 |
# File 'app/models/arclight/parent.rb', line 8 def eadid @eadid end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
8 9 10 |
# File 'app/models/arclight/parent.rb', line 8 def id @id end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
8 9 10 |
# File 'app/models/arclight/parent.rb', line 8 def label @label end |
#level ⇒ Object (readonly)
Returns the value of attribute level.
8 9 10 |
# File 'app/models/arclight/parent.rb', line 8 def level @level end |
Instance Method Details
#global_id ⇒ String
Concatenates the eadid and the id, to return an “id” in the context of Blacklight and Solr
20 21 22 23 24 |
# File 'app/models/arclight/parent.rb', line 20 def global_id return id if eadid == id "#{eadid}#{id}" end |