lib/tanshuku.rb in tanshuku-2.0.1 vs lib/tanshuku.rb in tanshuku-3.0.0
- old
+ new
@@ -13,13 +13,13 @@
# @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
+ # rubocop:disable ThreadSafety/InstanceVariableInClassMethod
@config ||= Configuration.new
- # rubocop:enable ThreadSafety/ClassInstanceVariable
+ # rubocop:enable ThreadSafety/InstanceVariableInClassMethod
end
# Configures Tanshuku.
#
# @yieldparam config [Tanshuku::Configuration] A configuration object that is yielded.
@@ -33,9 +33,9 @@
#
# @example
# Tanshuku.configure do |config|
# config.default_url_options = { host: "localhost", protocol: :https }
# end
- def self.configure(&block)
- config.configure(&block)
+ def self.configure(&)
+ config.configure(&)
end
end