Sha256: 425eb5c76d105569f0dfa1de23499c7992d6ee4faa025ae82757a7a355d50542

Contents?: true

Size: 645 Bytes

Versions: 2

Compression:

Stored size: 645 Bytes

Contents

require 'berkeley_library/marc/field_info/var_fields/obsolescible'

module BerkeleyLibrary
  module Marc
    module FieldInfo
      module VarFields
        # An indicator value definition.
        class IndValDef
          # TODO: include Comparable
          include Obsolescible

          attr_reader :val
          attr_reader :desc

          # TODO: destructure range values in some useful way (e.g. 130)
          def initialize(val:, desc:)
            @val = val
            @desc = desc
          end

          # see Object#to_s
          def to_s
            "#{val} - #{desc}"
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
berkeley_library-marc-0.3.1 lib/berkeley_library/marc/field_info/var_fields/ind_val_def.rb
berkeley_library-marc-0.3.0 lib/berkeley_library/marc/field_info/var_fields/ind_val_def.rb