Sha256: 72dcf0cab71936c8acbb54e893c43d5cb97d0675e8cf4e3e9501354ea23236e1

Contents?: true

Size: 454 Bytes

Versions: 6

Compression:

Stored size: 454 Bytes

Contents

# frozen_string_literal: true

module StoreModel
  # Contains methods for converting StoreModel::Model to ActiveModel::Type::Value.
  module TypeBuilders
    # Converts StoreModel::Model to Types::JsonType
    # @return [Types::JsonType]
    def to_type
      Types::JsonType.new(self)
    end

    # Converts StoreModel::Model to Types::ArrayType
    # @return [Types::ArrayType]
    def to_array_type
      Types::ArrayType.new(self)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
store_model-0.7.0 lib/store_model/type_builders.rb
store_model-0.6.2 lib/store_model/type_builders.rb
store_model-0.6.1 lib/store_model/type_builders.rb
store_model-0.6.0 lib/store_model/type_builders.rb
store_model-0.5.3 lib/store_model/type_builders.rb
store_model-0.5.2 lib/store_model/type_builders.rb