Class: Chewy::Type::Adapter::Sequel

Inherits:
Orm show all
Defined in:
lib/chewy/type/adapter/sequel.rb

Constant Summary

Constants inherited from Base

Base::BATCH_SIZE

Instance Attribute Summary collapse

Attributes inherited from Base

#options, #target

Class Method Summary collapse

Methods inherited from Orm

#identify, #import, #import_fields, #initialize, #load, #name

Methods inherited from Base

#identify, #import, #import_fields, #import_references, #load, #name, #type_name

Constructor Details

This class inherits a constructor from Chewy::Type::Adapter::Orm

Instance Attribute Details

#default_scopeObject (readonly) Also known as: default_dataset

Returns the value of attribute default_scope.



7
8
9
# File 'lib/chewy/type/adapter/sequel.rb', line 7

def default_scope
  @default_scope
end

Class Method Details

.accepts?(target) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
13
14
# File 'lib/chewy/type/adapter/sequel.rb', line 10

def self.accepts?(target)
  defined?(::Sequel::Model) && (
    target.is_a?(Class) && target < ::Sequel::Model ||
    target.is_a?(::Sequel::Dataset))
end