Class MARC::ControlField
In: lib/marc/controlfield.rb
Parent: Object

MARC records contain control fields, each of which has a tag and value. Tags for control fields must be in the 001-009 range or be specially added to the @@control_tags Set

Methods

==   =~   control_tag?   control_tags   new   to_hash   to_marchash   to_s  

Attributes

tag  [RW]  the tag value (007, 008, etc)
value  [RW]  the value of the control field

Public Class methods

A tag is a control tag if it is a member of the @@control_tags set as either a string (e.g., ‘FMT’) or in its .to_i representation (e.g., ‘008’.to_i == 3 is in @@control_tags by default)

The constructor which must be passed a tag value and an optional value for the field.

Public Instance methods

Two control fields are equal if their tags and values are equal.

Turn the control field into a hash for MARC-in-JSON

turning it into a marc-hash element

[Validate]