Class: Camille::Types::DateTime

Inherits:
Camille::Type show all
Includes:
Camille::Types
Defined in:
lib/camille/generators/templates/date_time.rb

Instance Attribute Summary

Attributes inherited from Camille::Type

#underlying

Attributes inherited from BasicType

#fingerprint

Instance Method Summary collapse

Methods included from Camille::Types

literal_lines

Methods inherited from Camille::Type

alias_of, #check, inherited, #initialize, klass_name, #literal, #test, test

Methods inherited from BasicType

&, #&, [], #[], #check, directly_instantiable?, inherited, #initialize, instance, |, #|

Constructor Details

This class inherits a constructor from Camille::Type

Instance Method Details

#transform(value) ⇒ Object

transforms a DateTime into a String of ISO 8601 format



9
10
11
# File 'lib/camille/generators/templates/date_time.rb', line 9

def transform value
  value.as_json
end