Class: UWDC::FileAsset

Inherits:
Object
  • Object
show all
Defined in:
lib/uwdc/mets.rb

Overview

Public: One file asset from the FileSec

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#hrefObject

Returns the value of attribute href.



198
199
200
# File 'lib/uwdc/mets.rb', line 198

def href
  @href
end

#idObject

Returns the value of attribute id.



198
199
200
# File 'lib/uwdc/mets.rb', line 198

def id
  @id
end

#mimetypeObject

Returns the value of attribute mimetype.



198
199
200
# File 'lib/uwdc/mets.rb', line 198

def mimetype
  @mimetype
end

#titleObject

Returns the value of attribute title.



198
199
200
# File 'lib/uwdc/mets.rb', line 198

def title
  @title
end

#useObject

Returns the value of attribute use.



198
199
200
# File 'lib/uwdc/mets.rb', line 198

def use
  @use
end