Sha256: 09a623aa615d2ccf9fb10953d35a58ea09ad41eb3a7e0eb1a11ce4888684293d

Contents?: true

Size: 766 Bytes

Versions: 1

Compression:

Stored size: 766 Bytes

Contents

module SoberSwag
  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')

    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

1 entries across 1 versions & 1 rubygems

Version Path
sober_swag-0.1.0 lib/sober_swag/serializer.rb