Sha256: ca79443a9f1850af5b280592c7c573970268c59a7c0e19508dfe2bf889fca7b4

Contents?: true

Size: 434 Bytes

Versions: 3

Compression:

Stored size: 434 Bytes

Contents

# frozen_string_literal: true

module AdequateSerialization
  module Options
    class Opts
      attr_reader :includes, :attachments, :options

      def initialize(includes: [], attach: {}, **options)
        @includes = Array(includes)
        @attachments = attach
        @options = options
      end
    end

    def self.from(*opts)
      Opts.new(**(opts[0] || {}))
    end

    def self.null
      Opts.new
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
adequate_serialization-2.0.1 lib/adequate_serialization/options.rb
adequate_serialization-2.0.0 lib/adequate_serialization/options.rb
adequate_serialization-1.0.1 lib/adequate_serialization/options.rb