Class: BerkeleyLibrary::Marc::FieldInfo::VarFields::SubfieldVal
- Inherits:
-
Object
- Object
- BerkeleyLibrary::Marc::FieldInfo::VarFields::SubfieldVal
- Includes:
- Obsolescible
- Defined in:
- lib/berkeley_library/marc/field_info/var_fields/subfield_val.rb
Constant Summary
Constants included from Obsolescible
Instance Attribute Summary collapse
-
#desc ⇒ Object
readonly
Returns the value of attribute desc.
-
#val ⇒ Object
readonly
Returns the value of attribute val.
Instance Method Summary collapse
-
#initialize(val:, desc:) ⇒ SubfieldVal
constructor
A new instance of SubfieldVal.
- #to_s ⇒ Object
Methods included from Obsolescible
#_reject_obsolete, #empty?, #obsolete?, #reject_obsoletes
Constructor Details
#initialize(val:, desc:) ⇒ SubfieldVal
Returns a new instance of SubfieldVal.
12 13 14 15 |
# File 'lib/berkeley_library/marc/field_info/var_fields/subfield_val.rb', line 12 def initialize(val:, desc:) @val = val @desc = desc end |
Instance Attribute Details
#desc ⇒ Object (readonly)
Returns the value of attribute desc.
10 11 12 |
# File 'lib/berkeley_library/marc/field_info/var_fields/subfield_val.rb', line 10 def desc @desc end |
#val ⇒ Object (readonly)
Returns the value of attribute val.
9 10 11 |
# File 'lib/berkeley_library/marc/field_info/var_fields/subfield_val.rb', line 9 def val @val end |
Instance Method Details
#to_s ⇒ Object
17 18 19 |
# File 'lib/berkeley_library/marc/field_info/var_fields/subfield_val.rb', line 17 def to_s "#{val} - #{desc}" end |