Class: BerkeleyLibrary::Util::ODS::XML::Manifest::FileEntry
- Inherits:
-
ElementNode
- Object
- ElementNode
- BerkeleyLibrary::Util::ODS::XML::Manifest::FileEntry
- Defined in:
- lib/berkeley_library/util/ods/xml/manifest/file_entry.rb
Instance Attribute Summary collapse
-
#full_path ⇒ Object
readonly
Returns the value of attribute full_path.
-
#manifest ⇒ Object
readonly
Returns the value of attribute manifest.
-
#media_type ⇒ Object
readonly
Returns the value of attribute media_type.
Attributes inherited from ElementNode
#doc, #element_name, #namespace
Instance Method Summary collapse
-
#initialize(full_path, media_type = nil, manifest:) ⇒ FileEntry
constructor
A new instance of FileEntry.
Methods inherited from ElementNode
#add_child, #attributes, #children, #clear_attribute, #create_element, #element, #ensure_element!, #prefix, #prefixed_attr_name, #set_attribute
Constructor Details
#initialize(full_path, media_type = nil, manifest:) ⇒ FileEntry
Returns a new instance of FileEntry.
14 15 16 17 18 19 20 21 22 |
# File 'lib/berkeley_library/util/ods/xml/manifest/file_entry.rb', line 14 def initialize(full_path, media_type = nil, manifest:) super(:manifest, 'file-entry', doc: manifest.doc) @full_path = full_path @media_type = media_type || media_type_for(full_path) @manifest = manifest set_default_attributes! end |
Instance Attribute Details
#full_path ⇒ Object (readonly)
Returns the value of attribute full_path.
10 11 12 |
# File 'lib/berkeley_library/util/ods/xml/manifest/file_entry.rb', line 10 def full_path @full_path end |
#manifest ⇒ Object (readonly)
Returns the value of attribute manifest.
12 13 14 |
# File 'lib/berkeley_library/util/ods/xml/manifest/file_entry.rb', line 12 def manifest @manifest end |
#media_type ⇒ Object (readonly)
Returns the value of attribute media_type.
11 12 13 |
# File 'lib/berkeley_library/util/ods/xml/manifest/file_entry.rb', line 11 def media_type @media_type end |