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
Overview
A subfield value definition.
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
see Object#to_s.
Methods included from Obsolescible
#_reject_obsolete, #empty?, #obsolete?, #reject_obsoletes
Constructor Details
#initialize(val:, desc:) ⇒ SubfieldVal
Returns a new instance of SubfieldVal.
13 14 15 16 |
# File 'lib/berkeley_library/marc/field_info/var_fields/subfield_val.rb', line 13 def initialize(val:, desc:) @val = val @desc = desc end |
Instance Attribute Details
#desc ⇒ Object (readonly)
Returns the value of attribute desc.
11 12 13 |
# File 'lib/berkeley_library/marc/field_info/var_fields/subfield_val.rb', line 11 def desc @desc end |
#val ⇒ Object (readonly)
Returns the value of attribute val.
10 11 12 |
# File 'lib/berkeley_library/marc/field_info/var_fields/subfield_val.rb', line 10 def val @val end |
Instance Method Details
#to_s ⇒ Object
see Object#to_s
19 20 21 |
# File 'lib/berkeley_library/marc/field_info/var_fields/subfield_val.rb', line 19 def to_s "#{val} - #{desc}" end |