Class: AnyQuery::Adapters::Base::Config Abstract Private
- Inherits:
-
Object
- Object
- AnyQuery::Adapters::Base::Config
- Defined in:
- lib/any_query/adapters/base.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(&block) ⇒ Config
constructor
private
A new instance of Config.
- #primary_key(key) ⇒ Object private
- #to_h ⇒ Object private
- #url(url) ⇒ Object private
Constructor Details
#initialize(&block) ⇒ Config
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Config.
152 153 154 |
# File 'lib/any_query/adapters/base.rb', line 152 def initialize(&block) instance_eval(&block) end |
Instance Method Details
#primary_key(key) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
160 161 162 |
# File 'lib/any_query/adapters/base.rb', line 160 def primary_key(key) @primary_key = key end |
#to_h ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
164 165 166 167 168 169 |
# File 'lib/any_query/adapters/base.rb', line 164 def to_h { url: @url, primary_key: @primary_key } end |
#url(url) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
156 157 158 |
# File 'lib/any_query/adapters/base.rb', line 156 def url(url) @url = url end |