Class: Glossarist::ConceptDate

Inherits:
Model
  • Object
show all
Includes:
Utilities::Enum
Defined in:
lib/glossarist/concept_date.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Utilities::Enum

extended, included

Methods inherited from Model

from_h, #initialize, new, #set_attribute

Constructor Details

This class inherits a constructor from Glossarist::Model

Instance Attribute Details

#dateString

Iso8601 date

Returns:

  • (String)


9
10
11
# File 'lib/glossarist/concept_date.rb', line 9

def date
  @date
end

Instance Method Details

#to_hObject



13
14
15
16
17
18
# File 'lib/glossarist/concept_date.rb', line 13

def to_h
  {
    "type" => type,
    "date" => date,
  }.compact
end