Sha256: 7549d51f3801e5292f5d8e9733cd6501e8508de9cec6f023a03bf73257613029
Contents?: true
Size: 665 Bytes
Versions: 5
Compression:
Stored size: 665 Bytes
Contents
# frozen_string_literal: true module Cocina module Models class Vocabulary # @private # Disabled this cop because we want @@uri to be inheritable. # rubocop:disable Style/ClassVars def self.create(uri) @@uri = uri self end # rubocop:enable Style/ClassVars def self.to_s @@uri end def self.property(name, method_name: name.to_s.underscore.to_sym) uri = [to_s, name].join properties[name] = uri (class << self; self; end).send(:define_method, method_name) { uri } end def self.properties @properties ||= {} end end end end
Version data entries
5 entries across 5 versions & 1 rubygems