Permalink
Browse files

Removed the "too-clever-for-my-own-good" override of MARC::DataField::[]

  • Loading branch information...
1 parent a0b13fa commit 75cc48e803f7953292fbb770741a2c14b096cc4d @rsinger committed Aug 19, 2009
Showing with 2 additions and 11 deletions.
  1. +2 −11 marcmodeler.rb
View
@@ -21,8 +21,7 @@ def strip_trailing_punct
end
def strip_leading_and_trailing_punct
str = self.sub(/[\.:,;\/\s\)\]]\s*$/,'').strip
- str.sub!(/^\s*[\.:,;\/\s\(\[]/,'').strip
- str
+ return str.strip.sub(/^\s*[\.:,;\/\s\(\[]/,'')
end
def lpad(count=1)
"#{" " * count}#{self}"
@@ -345,7 +344,7 @@ def relate_identity(datafield, resource, identity)
else
unless ["100","110"].index(datafield.tag)
resource.relate("[dct:contributor]", identity.resource.uri)
- resource.assert("[dc:contributor]", identity.resource.name)
+ resource.assert("[dc:contributor]", identity.name)
end
end
end
@@ -401,14 +400,6 @@ def to_rdf_resources
end
end
-class MARC::DataField
- def [](code)
- subfield = self.find {|s| s.code == code}
- return subfield.value.sub(/\.\s*/,'') if subfield
- return
- end
-end
-
class Identity
attr_accessor :name, :resource
def self.new_from_field(field, base_uri)

0 comments on commit 75cc48e

Please sign in to comment.