Class: UWDC::FileAsset
- Inherits:
-
Object
- Object
- UWDC::FileAsset
- Defined in:
- lib/uwdc/mets.rb
Overview
Public: One file asset from the FileSec
Instance Attribute Summary collapse
-
#href ⇒ Object
Returns the value of attribute href.
-
#id ⇒ Object
Returns the value of attribute id.
-
#mimetype ⇒ Object
Returns the value of attribute mimetype.
-
#title ⇒ Object
Returns the value of attribute title.
-
#use ⇒ Object
Returns the value of attribute use.
Instance Method Summary collapse
-
#initialize(node) ⇒ FileAsset
constructor
A new instance of FileAsset.
Constructor Details
#initialize(node) ⇒ FileAsset
Returns a new instance of FileAsset.
200 201 202 203 204 205 |
# File 'lib/uwdc/mets.rb', line 200 def initialize(node) @id = node["ID"] @mimetype = node["MIMETYPE"] @use = node["USE"] @href = node.children.detect{|child| child.name == "FLocat"}.attr('href') end |
Instance Attribute Details
#href ⇒ Object
Returns the value of attribute href.
198 199 200 |
# File 'lib/uwdc/mets.rb', line 198 def href @href end |
#id ⇒ Object
Returns the value of attribute id.
198 199 200 |
# File 'lib/uwdc/mets.rb', line 198 def id @id end |
#mimetype ⇒ Object
Returns the value of attribute mimetype.
198 199 200 |
# File 'lib/uwdc/mets.rb', line 198 def mimetype @mimetype end |
#title ⇒ Object
Returns the value of attribute title.
198 199 200 |
# File 'lib/uwdc/mets.rb', line 198 def title @title end |
#use ⇒ Object
Returns the value of attribute use.
198 199 200 |
# File 'lib/uwdc/mets.rb', line 198 def use @use end |