Class: MARC4J4R::ControlField

Inherits:
Object
  • Object
show all
Defined in:
lib/marc4j4r/controlfield.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.control_tag?(tag) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
19
20
# File 'lib/marc4j4r/controlfield.rb', line 16

def self.control_tag? tag
  return true if Java::org.marc4j.marc.impl.Verifier.isControlField(tag)
  return true if tag == 'FMT'
  return false
end

Instance Method Details

#==(other) ⇒ Object



29
30
31
# File 'lib/marc4j4r/controlfield.rb', line 29

def == other
  self.tag == other.tag && self.value == other.value
end

#controlField?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/marc4j4r/controlfield.rb', line 12

def controlField?
  return true
end

#to_sObject

Pretty-print

Parameters:

  • joiner (String)

    What string to use to join the subfields

  • The (String)

    pretty string



25
26
27
# File 'lib/marc4j4r/controlfield.rb', line 25

def to_s
  return self.tag + "    " + self.value
end

#valueObject



4
5
6
# File 'lib/marc4j4r/controlfield.rb', line 4

def value
  return self.data
end

#value=(str) ⇒ Object



8
9
10
# File 'lib/marc4j4r/controlfield.rb', line 8

def value= str
  self.data = str
end