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
(also: #global_id)
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
- #collection? ⇒ Boolean
-
#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.
13 14 15 16 17 18 |
# File 'app/models/arclight/parent.rb', line 13 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) Also known as: global_id
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
#collection? ⇒ Boolean
20 21 22 |
# File 'app/models/arclight/parent.rb', line 20 def collection? level == 'collection' end |