Class: Dms::LocalDate

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#valueObject (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

#hashObject



45
# File 'lib/dms/types.rb', line 45

def hash; [LocalDate, @value].hash; end

#to_sObject



46
# File 'lib/dms/types.rb', line 46

def to_s; @value; end