Module: LogicPro::PrimitiveTypes

Included in:
Types
Defined in:
lib/logic_pro/primitive_types.rb

Constant Summary collapse

Boolean =
Bool.constructor { |value| ActiveRecord::Type::Boolean.new.serialize(value) }
String =
Constructor(::String, &:to_s)
Symbol =
Constructor(::String, &:to_sym)
Hash =
Constructor(::Hash, &:to_h)
Float =
Constructor(::Float, &:to_f)
Integer =
Constructor(::Integer, &:to_i)
DateTime =
Constructor(::DateTime) { |value| ::DateTime.parse(value.to_s) if value.present? }
InteractorType =
Constructor(::Interactor) { |value| value }