Sha256: e6b5cc5e13e220a08a22d5a4c60b3544847fb6fd1e73c1497c5cc9f2e920425a

Contents?: true

Size: 590 Bytes

Versions: 9

Compression:

Stored size: 590 Bytes

Contents

# frozen_string_literal: true

module Arstotzka
  # @api private
  #
  # Common code to be used by classes
  module Base
    private

    # Sets the @options object
    #
    # @overload options=(options_hash={})
    #   @param options_hash [Hash] options
    #
    # @overload options=(options)
    #   @param options [Arstotzka::Options] options object
    #
    # @return [Arstotzka::Options]
    def options=(options)
      @options = if options.is_a?(Hash)
                   Options.new(options)
                 else
                   options
                 end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
arstotzka-1.3.2 lib/arstotzka/base.rb
arstotzka-1.3.1 lib/arstotzka/base.rb
arstotzka-1.3.0 lib/arstotzka/base.rb
arstotzka-1.2.4 lib/arstotzka/base.rb
arstotzka-1.2.3 lib/arstotzka/base.rb
arstotzka-1.2.2 lib/arstotzka/base.rb
arstotzka-1.2.1 lib/arstotzka/base.rb
arstotzka-1.2.0 lib/arstotzka/base.rb
arstotzka-1.1.0 lib/arstotzka/base.rb