Sha256: aef468b1cc20530b61cc47cb1968930ca93da56dcb065970baee8333ba071c07
Contents?: true
Size: 665 Bytes
Versions: 27
Compression:
Stored size: 665 Bytes
Contents
# frozen_string_literal: true module Dor class Ontology class << self def key?(key) @data.key?(key) end # Yields each term to the block provided def options @data.map do |k, _v| yield property(k) end end def property(key) Term.new(@data[key].merge(key: key)) end end class Term def initialize(uri:, human_readable:, key:, deprecation_warning: nil) @label = human_readable @uri = uri @deprecation_warning = deprecation_warning @key = key end attr_reader :label, :uri, :deprecation_warning, :key end end end
Version data entries
27 entries across 27 versions & 1 rubygems