def add_element(element)
      raise ArgumentError, "Invalid argument 'element'. Expected DictionaryElement, got #{element.class}" unless element.is_a?(DictionaryElement)
      # We store the elements in a hash with tag as key and the element instance as value:
      @elements[element.tag] = element
      # Populate the method conversion hashes with element data:
      method = element.name.to_element_method
      @methods_from_names[element.name] = method
      @names_from_methods[method] = element.name
    end
def add_element(element)
      raise ArgumentError, "Invalid argument 'element'. Expected DictionaryElement, got #{element.class}" unless element.is_a?(DictionaryElement)
      # We store the elements in a hash with tag as key and the element instance as value:
      @elements[element.tag] = element
      # Populate the method conversion hashes with element data:
      method = element.name.to_element_method
      @methods_from_names[element.name] = method
      @names_from_methods[method] = element.name
    end
Creates a DLibrary instance.

 Adds a custom DictionaryElement to the ruby-dicom element dictionary.

 @param [DictionaryElement] element the custom dictionary element to be added