lib/evil/client/settings.rb in evil-client-3.0.4 vs lib/evil/client/settings.rb in evil-client-3.1.0
- old
+ new
@@ -48,13 +48,13 @@
#
# @param [Logger, nil] logger
# @param [Hash<#to_sym, Object>, nil] opts
# @return [Evil::Client::Settings]
#
- def new(logger, op = {})
+ def new(logger, **op)
logger&.debug(self) { "initializing with options #{op}..." }
- super(op).tap do |item|
+ super(**op).tap do |item|
item.logger = logger
logger&.debug(item) { "initialized" }
end
end
end
@@ -91,10 +91,10 @@
# Human-readable representation of settings instance
#
# @return [String]
#
def inspect
- number = super.match(/\>\:([^ ]+) /)[1]
+ number = super.match(/>:([^ ]+) /)[1]
params = options.map { |k, v| "@#{k}=#{v}" }.join(", ")
number ? "#<#{self.class}:#{number} #{params}>" : super
end
alias_method :to_str, :inspect
alias_method :to_s, :inspect