class ActiveFedora::AssociationHash

def key?(key)

in earlier versions of ruby.
manner that avoids generating extra symbols. Symbols are not garbage collected
Check that the key exists with indifferent access (symbol or string) in a
def key?(key)
  keys.include?(key) || keys.map(&:to_s).include?(key)
end