提交 b635eea7 编写于 作者: A Aaron Patterson

use kwargs to avoid hash slicing

we can use kwargs in this case to avoid values_at and except calls on
the options hash
上级 8c53b412
......@@ -57,9 +57,9 @@ def compute_and_store_digest(cache_key, options) # called under @@digest_monitor
attr_reader :name, :finder, :options
def initialize(options)
@name, @finder = options.values_at(:name, :finder)
@options = options.except(:name, :finder)
def initialize(name:, finder:, **options)
@name, @finder = name, finder
@options = options
end
def digest
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册