Class: Mida::DataType::ISO8601Date
- Defined in:
- lib/mida/datatype/iso8601date.rb
Overview
ISO 8601 Date data type Provides access to DateTime methods
Instance Method Summary collapse
-
#initialize(value) ⇒ ISO8601Date
constructor
Raises
ArgumentError
if value not valid. - #to_s ⇒ Object
Methods inherited from Generic
#==, #method_missing, parse, #to_yaml
Constructor Details
#initialize(value) ⇒ ISO8601Date
Raises ArgumentError
if value not valid
12 13 14 15 16 |
# File 'lib/mida/datatype/iso8601date.rb', line 12 def initialize(value) @parsedValue = ::DateTime.iso8601(value) rescue => e raise ArgumentError, e end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Mida::DataType::Generic
Instance Method Details
#to_s ⇒ Object
18 19 20 |
# File 'lib/mida/datatype/iso8601date.rb', line 18 def to_s @parsedValue.rfc822 end |