Class: Pubid::Sae::Components::Date
- Inherits:
-
Lutaml::Model::Serializable
- Object
- Lutaml::Model::Serializable
- Pubid::Sae::Components::Date
- Defined in:
- lib/pubid/sae/components/date.rb
Overview
Date component for SAE standards SAE uses year only (e.g., 2024, 2022)
Instance Method Summary collapse
Instance Method Details
#present? ⇒ Boolean
13 14 15 |
# File 'lib/pubid/sae/components/date.rb', line 13 def present? !year.nil? end |
#render(context: nil) ⇒ Object
21 22 23 |
# File 'lib/pubid/sae/components/date.rb', line 21 def render(context: nil) year.to_s end |
#to_s ⇒ Object
17 18 19 |
# File 'lib/pubid/sae/components/date.rb', line 17 def to_s render end |