Class: Arclight::LevelLabel
- Inherits:
-
Object
- Object
- Arclight::LevelLabel
- Defined in:
- lib/arclight/level_label.rb
Overview
A utility class to return a human-readable label for an EAD @level code. Can use the value from @otherlevel if provided. Examples from @level: recordgrp = “Record Group”
collection = "Collection"
subseries = "Subseries"
otherlevel = (text provided in @otherlevel)
Instance Method Summary collapse
-
#initialize(level, other_level = nil) ⇒ LevelLabel
constructor
A new instance of LevelLabel.
-
#to_s ⇒ String
The human-readable label.
Constructor Details
#initialize(level, other_level = nil) ⇒ LevelLabel
Returns a new instance of LevelLabel.
14 15 16 17 |
# File 'lib/arclight/level_label.rb', line 14 def initialize(level, other_level = nil) @level = level @other_level = other_level if other_level.present? end |
Instance Method Details
#to_s ⇒ String
Returns the human-readable label.
20 21 22 |
# File 'lib/arclight/level_label.rb', line 20 def to_s human_readable_level end |