Class: CocinaDisplay::Forms::ResourceType
- Defined in:
- lib/cocina_display/forms/resource_type.rb
Overview
A Resource Type form associated with part or all of a Cocina object.
Instance Attribute Summary
Attributes inherited from Form
Instance Method Summary collapse
-
#mods? ⇒ Boolean
Is this a MODS resource type?.
-
#stanford_self_deposit? ⇒ Boolean
Is this a Stanford self-deposit resource type?.
-
#to_s ⇒ String
Resource types are lowercased for display.
Methods inherited from Form
#flat_value, from_cocina, #initialize, #label, #type, #values
Constructor Details
This class inherits a constructor from CocinaDisplay::Forms::Form
Instance Method Details
#mods? ⇒ Boolean
Is this a MODS resource type?
20 21 22 |
# File 'lib/cocina_display/forms/resource_type.rb', line 20 def mods? source == "MODS resource types" end |
#stanford_self_deposit? ⇒ Boolean
Note:
These are handled separately when displayed.
Is this a Stanford self-deposit resource type?
14 15 16 |
# File 'lib/cocina_display/forms/resource_type.rb', line 14 def stanford_self_deposit? source == "Stanford self-deposit resource types" end |
#to_s ⇒ String
Resource types are lowercased for display.
7 8 9 |
# File 'lib/cocina_display/forms/resource_type.rb', line 7 def to_s super&.downcase end |