Sha256: adfd0d0298272f2966f4be194dcbcbcc6b27a7cac0d68ed53ae171757f9e4b56
Contents?: true
Size: 983 Bytes
Versions: 8
Compression:
Stored size: 983 Bytes
Contents
module SoberSwag ## # Container module for serializers. # The interface for these is described in {SoberSwag::Serializer::Base}. module Serializer autoload(:Base, 'sober_swag/serializer/base') autoload(:Primitive, 'sober_swag/serializer/primitive') autoload(:Conditional, 'sober_swag/serializer/conditional') autoload(:Array, 'sober_swag/serializer/array') autoload(:Mapped, 'sober_swag/serializer/mapped') autoload(:Optional, 'sober_swag/serializer/optional') autoload(:FieldList, 'sober_swag/serializer/field_list') autoload(:Hash, 'sober_swag/serializer/hash') autoload(:Meta, 'sober_swag/serializer/meta') class << self ## # Use a "Primitive" serializer, which *does not* actually do any type-changing, and instead passes # in values raw. # # @param contained {Class} Dry::Type to use def primitive(contained) SoberSwag::Serializer::Primitive.new(contained) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems