Class: Arclight::Parent

Inherits:
Object
  • Object
show all
Defined in:
app/models/arclight/parent.rb

Overview

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#eadidObject (readonly)

Returns the value of attribute eadid.



8
9
10
# File 'app/models/arclight/parent.rb', line 8

def eadid
  @eadid
end

#idObject (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

#labelObject (readonly)

Returns the value of attribute label.



8
9
10
# File 'app/models/arclight/parent.rb', line 8

def label
  @label
end

#levelObject (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

Returns:

  • (Boolean)


20
21
22
# File 'app/models/arclight/parent.rb', line 20

def collection?
  level == 'collection'
end