Class: Hydra::Datastream::MigrationInfo
- Inherits:
-
ActiveFedora::OmDatastream
- Object
- ActiveFedora::OmDatastream
- Hydra::Datastream::MigrationInfo
- Defined in:
- lib/hydra/datastream/migration_info.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.xml_template ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/hydra/datastream/migration_info.rb', line 18 def self.xml_template builder = Nokogiri::XML::Builder.new do |xml| xml.migrationInfo(:xmlns=>"http://hydra-collab.stanford.edu/schemas/migrationInfo/v1") { xml.current xml.history } end builder.doc end |
Instance Method Details
#migrate(to) ⇒ Object
32 33 34 |
# File 'lib/hydra/datastream/migration_info.rb', line 32 def migrate(to) add_child_node(find_by_terms(:history), :migration, current.first.to_s, to, Time.now) end |