Class: UWDC::Div

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

Overview

Public: One division from the StructMap

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(node) ⇒ Div

Returns a new instance of Div.



180
181
182
183
184
185
# File 'lib/uwdc/mets.rb', line 180

def initialize(node)
  @node     = node
  @id       = node["ID"]
  @admid    = node["ADMID"]
  @order    = node["ORDER"] ? node["ORDER"] : ""
end

Instance Attribute Details

#admidObject

Returns the value of attribute admid.



178
179
180
# File 'lib/uwdc/mets.rb', line 178

def admid
  @admid
end

#idObject

Returns the value of attribute id.



178
179
180
# File 'lib/uwdc/mets.rb', line 178

def id
  @id
end

#orderObject

Returns the value of attribute order.



178
179
180
# File 'lib/uwdc/mets.rb', line 178

def order
  @order
end

Instance Method Details

#file_pointersObject



187
188
189
# File 'lib/uwdc/mets.rb', line 187

def file_pointers
  @node.children.map{|node| node["FILEID"] if node.name == "fptr"}.compact
end

#kidsObject



191
192
193
# File 'lib/uwdc/mets.rb', line 191

def kids
  @node.children.map{|div| Div.new(div) if div.name == "div"}.compact
end