lib/marc/datafield.rb in marc-0.0.9 vs lib/marc/datafield.rb in marc-0.1.0
- old
+ new
@@ -136,7 +136,17 @@
def =~(regex)
return self.to_s =~ regex
end
+
+ # to get the field as a string, without the tag and indicators
+ # useful in situations where you want a legible version of the field
+ #
+ # print record['245'].value
+
+ def value
+ return(@subfields.map {|s| s.value} .join '')
+ end
+
end
end