Class: Dms::LocalDate
- Inherits:
-
Object
- Object
- Dms::LocalDate
- Defined in:
- lib/dms/types.rb
Overview
Marker classes for datetime variants. The inner string is already spec-validated by the parser.
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #==(o) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(value) ⇒ LocalDate
constructor
A new instance of LocalDate.
- #to_s ⇒ Object
Constructor Details
#initialize(value) ⇒ LocalDate
Returns a new instance of LocalDate.
42 |
# File 'lib/dms/types.rb', line 42 def initialize(value); @value = value; end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
41 42 43 |
# File 'lib/dms/types.rb', line 41 def value @value end |
Instance Method Details
#==(o) ⇒ Object Also known as: eql?
43 |
# File 'lib/dms/types.rb', line 43 def ==(o); o.is_a?(LocalDate) && @value == o.value; end |
#hash ⇒ Object
45 |
# File 'lib/dms/types.rb', line 45 def hash; [LocalDate, @value].hash; end |
#to_s ⇒ Object
46 |
# File 'lib/dms/types.rb', line 46 def to_s; @value; end |