Commit 2afa90b6 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Don't extend from struct as rubocop suggests

parent 090f034b
require 'spec_helper' require 'spec_helper'
describe Gitlab::Cache::RequestStoreWrap, :request_store do describe Gitlab::Cache::RequestStoreWrap, :request_store do
class ExpensiveAlgorithm < Struct.new(:id, :name, :result) class ExpensiveAlgorithm
extend Gitlab::Cache::RequestStoreWrap extend Gitlab::Cache::RequestStoreWrap
attr_accessor :id, :name, :result
def initialize(id, name, result)
self.id = id
self.name = name
self.result = result
end
request_store_wrap_key do request_store_wrap_key do
[id, name] [id, name]
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment