Module: Zen::Query::Attributes

Included in:
Zen::Query
Defined in:
lib/zen/query/attributes.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(target) ⇒ Object



31
32
33
# File 'lib/zen/query/attributes.rb', line 31

def self.included(target)
  target.extend(ClassMethods)
end

Instance Method Details

#initialize(**attrs) ⇒ Object



35
36
37
38
39
40
# File 'lib/zen/query/attributes.rb', line 35

def initialize(**attrs)
  attributes = attrs.dup
  attributes.delete(:params)
  assert_valid_attributes!(attributes)
  @attributes = attributes
end