BigW Consortium Gitlab

Commit 2afa90b6 by Lin Jen-Shin

Don't extend from struct as rubocop suggests

parent 090f034b
require 'spec_helper'
describe Gitlab::Cache::RequestStoreWrap, :request_store do
class ExpensiveAlgorithm < Struct.new(:id, :name, :result)
class ExpensiveAlgorithm
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
[id, name]
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