Class: AnyQuery::Adapters::Base::Config Abstract Private

Inherits:
Object
  • Object
show all
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.

This class is abstract.

API:

  • private

Instance Method Summary collapse

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.

API:

  • private



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.

API:

  • private



160
161
162
# File 'lib/any_query/adapters/base.rb', line 160

def primary_key(key)
  @primary_key = key
end

#to_hObject

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.

API:

  • private



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.

API:

  • private



156
157
158
# File 'lib/any_query/adapters/base.rb', line 156

def url(url)
  @url = url
end