class DarwinCore::Core
Represents core of the DarwinCore
Archive
Attributes
id[R]
Public Class Methods
new(dwc)
click to toggle source
rubocop:disable Metrics/MethodLength
# File lib/dwc_archive/core.rb, line 10 def initialize(dwc) @dwc = dwc @archive = @dwc.archive @path = @archive.files_path root_key = @archive.meta.keys[0] @data = @archive.meta[root_key][:core] unless @data raise DarwinCore::CoreFileError, "Cannot find core in meta.xml, is meta.xml valid?" end @id = @data[:id][:attributes] init_attributes end