Class: DPN::Bagit::Bag::DPNInfoTxt

Inherits:
Object
  • Object
show all
Defined in:
lib/dpn/bagit/bag/dpn_info_txt.rb

Overview

A wrapper for the dpn-info.txt file within the bag. Once created, it does not change with changes made to the underlying txt file; in that case, a new Bag should be created.

Instance Method Summary collapse

Instance Method Details

#[](key) ⇒ Object

Get the value associated with the given field.

Parameters:

  • key (Symbol)


86
87
88
# File 'lib/dpn/bagit/bag/dpn_info_txt.rb', line 86

def [](key)
  return @dpnInfo[key.to_sym]
end

#getErrorsArray<String]

Returns a list of any errors encountered on creation and validation.

Returns:

  • (Array<String])

    Array<String]



80
81
82
# File 'lib/dpn/bagit/bag/dpn_info_txt.rb', line 80

def getErrors()
  return @dpnInfoErrors
end