Class: Ddr::Structures::FileSec

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/ddr/structures/file_sec.rb

Overview

Wraps a Nokogiri (XML) ‘fileSec’ node

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.build(args) ⇒ Object



15
16
17
18
19
# File 'lib/ddr/structures/file_sec.rb', line 15

def self.build(args)
  node = Nokogiri::XML::Node.new('fileSec', args[:document])
  node['ID'] = args[:id] if args[:id]
  node
end

Instance Method Details

#filegrpsObject



11
12
13
# File 'lib/ddr/structures/file_sec.rb', line 11

def filegrps
  xpath('xmlns:fileGrp').map { |node| FileGrp.new(node) }
end

#idObject



7
8
9
# File 'lib/ddr/structures/file_sec.rb', line 7

def id
  self['ID']
end