Class: Libis::Tools::MetsFile::Div
Instance Attribute Summary collapse
Instance Method Summary
collapse
#id, #set_from_hash, #to_s
Instance Attribute Details
Returns the value of attribute label.
474
475
476
|
# File 'lib/libis/tools/mets_file.rb', line 474
def label
@label
end
|
Instance Method Details
492
493
494
495
496
497
498
499
500
501
|
# File 'lib/libis/tools/mets_file.rb', line 492
def <<(obj)
case obj
when File
files << obj
when Div
divs << obj
else
raise RuntimeError, "Child object type not supported: #{obj.class}"
end
end
|
480
481
482
|
# File 'lib/libis/tools/mets_file.rb', line 480
def children
files + divs
end
|
488
489
490
|
# File 'lib/libis/tools/mets_file.rb', line 488
def divs
@divs ||= Array.new
end
|
484
485
486
|
# File 'lib/libis/tools/mets_file.rb', line 484
def files
@files ||= Array.new
end
|
476
477
478
|
# File 'lib/libis/tools/mets_file.rb', line 476
def xml_id
"div-#{id}"
end
|