Class: Relaton::Bib::StringDate
- Inherits:
-
Lutaml::Model::Type::Value
- Object
- Lutaml::Model::Type::Value
- Relaton::Bib::StringDate
- Defined in:
- lib/relaton/bib/model/type/string_date.rb
Defined Under Namespace
Classes: Value
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.cast(value) ⇒ Object
36 37 38 39 40 41 |
# File 'lib/relaton/bib/model/type/string_date.rb', line 36 def self.cast(value) case value when Value then value when String then Value.parse_date(value) end end |
Instance Method Details
#to_yaml ⇒ Object
43 44 45 |
# File 'lib/relaton/bib/model/type/string_date.rb', line 43 def to_yaml value.to_s end |