Sha256: c9cf02dec9340ea9885db3d5efff930ff2cc9299b551a076fe5190b267caa5ff

Contents?: true

Size: 317 Bytes

Versions: 7

Compression:

Stored size: 317 Bytes

Contents

module ActiveFedora
  class DatastreamHash < Hash
    
    def initialize (obj)
      @obj = obj
      super()
    end

    def [] (key)
      if key == 'DC' && !has_key?(key)
        ds = Datastream.new(@obj.inner_object, key, true)
        ds.content
        self[key] = ds
      end
      super
    end 
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
active-fedora-3.1.0.pre7 lib/active_fedora/datastream_hash.rb
active-fedora-3.1.0.pre6 lib/active_fedora/datastream_hash.rb
active-fedora-3.1.0.pre5 lib/active_fedora/datastream_hash.rb
active-fedora-3.1.0.pre4 lib/active_fedora/datastream_hash.rb
active-fedora-3.1.0.pre3 lib/active_fedora/datastream_hash.rb
active-fedora-3.1.0.pre2 lib/active_fedora/datastream_hash.rb
active-fedora-3.1.0.pre1 lib/active_fedora/datastream_hash.rb