Skip to content

Commit 25b38a0

Browse files
authored
remove ostruct dependency (#5)
1 parent 9bc5968 commit 25b38a0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/tableless/connection_adapters/dummy_adapter.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# frozen_string_literal: true
2-
require 'ostruct'
32

43
module Tableless
54
class DummyAdapter < ActiveRecord::ConnectionAdapters::AbstractAdapter
5+
DbConfig = Struct.new(:adapter)
6+
67
def initialize(*)
78
super
89
@schema_cache = Tableless::SchemaCache.new
@@ -17,7 +18,7 @@ def get_schema_cache(*)
1718
end
1819

1920
def db_config(*)
20-
@db_config ||= OpenStruct.new(adapter: :dummy)
21+
@db_config ||= DbConfig.new(:dummy)
2122
end
2223

2324
def with_connection(*)

0 commit comments

Comments
 (0)