Class: Tableless::DummyAdapter
- Inherits:
-
ActiveRecord::ConnectionAdapters::AbstractAdapter
- Object
- ActiveRecord::ConnectionAdapters::AbstractAdapter
- Tableless::DummyAdapter
- Defined in:
- lib/tableless/connection_adapters/dummy_adapter.rb
Instance Method Summary collapse
- #db_config ⇒ Object
- #get_schema_cache ⇒ Object
-
#initialize ⇒ DummyAdapter
constructor
A new instance of DummyAdapter.
- #schema_cache ⇒ Object
- #with_connection {|_self| ... } ⇒ Object
Constructor Details
#initialize ⇒ DummyAdapter
Returns a new instance of DummyAdapter.
6 7 8 9 |
# File 'lib/tableless/connection_adapters/dummy_adapter.rb', line 6 def initialize(*) super @schema_cache = Tableless::SchemaCache.new end |
Instance Method Details
#db_config ⇒ Object
19 20 21 |
# File 'lib/tableless/connection_adapters/dummy_adapter.rb', line 19 def db_config(*) @db_config ||= OpenStruct.new(adapter: :dummy) end |
#get_schema_cache ⇒ Object
15 16 17 |
# File 'lib/tableless/connection_adapters/dummy_adapter.rb', line 15 def get_schema_cache(*) @schema_cache end |
#schema_cache ⇒ Object
11 12 13 |
# File 'lib/tableless/connection_adapters/dummy_adapter.rb', line 11 def schema_cache @schema_cache end |
#with_connection {|_self| ... } ⇒ Object
23 24 25 |
# File 'lib/tableless/connection_adapters/dummy_adapter.rb', line 23 def with_connection(*) yield self end |