Class: Mida::DataType::ISO8601Date

Inherits:
Generic
  • Object
show all
Defined in:
lib/mida/datatype/iso8601date.rb

Overview

ISO 8601 Date data type Provides access to DateTime methods

Instance Method Summary collapse

Methods inherited from Generic

#==, #method_missing, parse, #to_yaml

Constructor Details

#initialize(value) ⇒ ISO8601Date

Raises ArgumentError if value not valid



12
13
14
# File 'lib/mida/datatype/iso8601date.rb', line 12

def initialize(value)
  @parsedValue = ::DateTime.iso8601(value)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Mida::DataType::Generic

Instance Method Details

#to_sObject



16
17
18
# File 'lib/mida/datatype/iso8601date.rb', line 16

def to_s
  @parsedValue.rfc822
end