Sha256: 91b965766fc8d84a81f6030980137600bcc948f329a30d7a07a79c438ba297a8
Contents?: true
Size: 1.21 KB
Versions: 2
Compression:
Stored size: 1.21 KB
Contents
# frozen_string_literal: true require_relative "tanshuku/configuration" require_relative "tanshuku/engine" require_relative "tanshuku/version" # Tanshuku’s namespace. module Tanshuku # Returns a configuration object for Tanshuku. # # @return [Tanshuku::Configuration] # # @note # Mutating a {Tanshuku::Configuration} object is thread-<em><b>unsafe</b></em>. It is recommended to use # {Tanshuku.configure} for configuration. def self.config # Disable this cop but use `Tanshuku::Configuration#configure` for thread-safety. # rubocop:disable ThreadSafety/ClassInstanceVariable @config ||= Configuration.new # rubocop:enable ThreadSafety/ClassInstanceVariable end # Configures Tanshuku. # # @yieldparam config [Tanshuku::Configuration] A configuration object that is yielded. # @yieldreturn [void] # # @return [void] # # @note # This method is thread-safe. When mutating a {Tanshuku::Configuration} object for configuration, it is recommended # to use this method. # # @example # Tanshuku.configure do |config| # config.default_url_options = { host: "localhost", protocol: :https } # end def self.configure(&block) config.configure(&block) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tanshuku-2.0.1 | lib/tanshuku.rb |
tanshuku-1.0.1 | lib/tanshuku.rb |