Class: Datacite::Mapping::ReadOnlyTextNode

Inherits:
XML::Mapping::TextNode
  • Object
show all
Includes:
ReadOnlyNodes
Defined in:
lib/datacite/mapping/read_only_nodes.rb

Instance Method Summary collapse

Methods included from ReadOnlyNodes

#obj_to_xml, #value_from, #value_str, warn, #warn_reason

Instance Method Details

#warn_ignored(val)

Raises:

  • (ArgumentError)


52
53
54
55
56
57
# File 'lib/datacite/mapping/read_only_nodes.rb', line 52

def warn_ignored(val)
  raise ArgumentError, "Expected string, got #{val}" unless val.respond_to?(:strip)
  return if val.strip.empty?

  super
end