Sha256: 9e87e2cde067710fdd900bd8144eab35b99f65cf5dd1c129172411fef7f10e0c
Contents?: true
Size: 618 Bytes
Versions: 26
Compression:
Stored size: 618 Bytes
Contents
# frozen_string_literal: true module Glossarist class RelatedConcept < Model include Glossarist::Utilities::Enum register_enum :type, Glossarist::GlossaryDefinition::RELATED_CONCEPT_TYPES # @return [String] attr_accessor :content # Reference to the related concept. # @return [Citation] attr_reader :ref def ref=(ref) @ref = Citation.new(ref) end def to_h reference = ref&.to_h reference&.merge!(reference&.delete("ref")) { "type" => type.to_s, "content" => content, "ref" => reference, }.compact end end end
Version data entries
26 entries across 26 versions & 2 rubygems