Class: ActiveFedora::FilesHash

Inherits:
AssociationHash show all
Defined in:
lib/active_fedora/files_hash.rb

Instance Attribute Summary

Attributes inherited from AssociationHash

#base

Instance Method Summary collapse

Methods inherited from AssociationHash

#[], #[]=, #association, #changed, #each, #each_value, #freeze, #key?, #merge, #select, #values

Constructor Details

#initialize(model, reflections = nil) ⇒ FilesHash

Returns a new instance of FilesHash.



3
4
5
# File 'lib/active_fedora/files_hash.rb', line 3

def initialize(model, reflections = nil)
  super
end

Instance Method Details

#keysObject



11
12
13
# File 'lib/active_fedora/files_hash.rb', line 11

def keys
  reflections.keys + @base.undeclared_files
end

#reflectionsObject



7
8
9
# File 'lib/active_fedora/files_hash.rb', line 7

def reflections
  @base.class.child_resource_reflections
end