Class: RMARC::ControlField
- Inherits:
-
VariableField
- Object
- VariableField
- RMARC::ControlField
- Defined in:
- lib/rmarc/model/control_field.rb
Overview
This class represents a control field in a MARC record.
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
Attributes inherited from VariableField
Instance Method Summary collapse
-
#initialize(tag, data = nil) ⇒ ControlField
constructor
A new instance of ControlField.
-
#to_s ⇒ Object
Returns a string representaiton for a conctrol field.
Constructor Details
#initialize(tag, data = nil) ⇒ ControlField
Returns a new instance of ControlField.
32 33 34 35 |
# File 'lib/rmarc/model/control_field.rb', line 32 def initialize(tag, data = nil) super(tag) @data = data end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
30 31 32 |
# File 'lib/rmarc/model/control_field.rb', line 30 def data @data end |
Instance Method Details
#to_s ⇒ Object
Returns a string representaiton for a conctrol field.
Example:
001 11939876
42 43 44 |
# File 'lib/rmarc/model/control_field.rb', line 42 def to_s super + "#@data" end |