class Ddr::Models::DescriptiveMetadata

Attributes

object[R]

Public Class Methods

field_names() click to toggle source
# File lib/ddr/models/metadata/descriptive_metadata.rb, line 19
def field_names
  mapping.keys
end
Also aliased as: field_readers
field_readers()
Alias for: field_names
field_writers() click to toggle source
# File lib/ddr/models/metadata/descriptive_metadata.rb, line 24
def field_writers
  field_names.map { |name| "#{name}=".to_sym }
end
mapping() click to toggle source
# File lib/ddr/models/metadata/descriptive_metadata.rb, line 11
def mapping
  @mapping ||= mappings.reduce(&:merge)
end
new(object) click to toggle source
# File lib/ddr/models/metadata/descriptive_metadata.rb, line 48
def initialize(object)
  @object = object
end
property_terms() click to toggle source
# File lib/ddr/models/metadata/descriptive_metadata.rb, line 28
def property_terms
  mapping.terms.each_with_object({}) do |term, memo|
    memo[term.unqualified_name] = term.qualified_name
  end
end
unqualified_names() click to toggle source
# File lib/ddr/models/metadata/descriptive_metadata.rb, line 15
def unqualified_names
  mapping.unqualified_names
end