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
# File 'lib/marc4j4r/controlfield.rb', line 16

def self.control_tag? tag
  return Java::org.marc4j.marc.impl.Verifier.isControlField tag
end

Instance Method Details

#==(other) ⇒ Object



27
28
29
# File 'lib/marc4j4r/controlfield.rb', line 27

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



23
24
25
# File 'lib/marc4j4r/controlfield.rb', line 23

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