Class: Glossarist::ConceptDate

Inherits:
Lutaml::Model::Serializable
  • Object
show all
Defined in:
lib/glossarist/concept_date.rb

Direct Known Subclasses

V3::ConceptDate

Instance Method Summary collapse

Instance Method Details

#dateString

Iso8601 date

Returns:

  • (String)


7
# File 'lib/glossarist/concept_date.rb', line 7

attribute :date, :date_time

#to_yaml_dateObject

Returns the date as a string for flat YAML fields such as ManagedConcept#date_accepted. Subclasses whose date is not a DateTime override this so callers do not need to type-check.



19
20
21
# File 'lib/glossarist/concept_date.rb', line 19

def to_yaml_date
  date&.iso8601
end