Module: StoreModel::TypeBuilders

Defined in:
lib/store_model/type_builders.rb

Overview

Contains methods for converting StoreModel::Model to ActiveModel::Type::Value.

Instance Method Summary collapse

Instance Method Details

#to_array_typeTypes::Many

Converts StoreModel::Model to Types::Many

Returns:



14
15
16
# File 'lib/store_model/type_builders.rb', line 14

def to_array_type
  Types::Many.new(self)
end

#to_typeTypes::One

Converts StoreModel::Model to Types::One

Returns:



8
9
10
# File 'lib/store_model/type_builders.rb', line 8

def to_type
  Types::One.new(self)
end