Class: PlainQuery::Builder

Inherits:
Module
  • Object
show all
Defined in:
lib/plain_query/builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(model: nil) ⇒ Builder

Returns a new instance of Builder.



12
13
14
# File 'lib/plain_query/builder.rb', line 12

def initialize(model: nil)
  @builder_options = BuilderOptions.new(model: model)
end

Instance Attribute Details

#builder_optionsObject (readonly)

Returns the value of attribute builder_options.



10
11
12
# File 'lib/plain_query/builder.rb', line 10

def builder_options
  @builder_options
end

Instance Method Details

#included(klass) ⇒ Object



16
17
18
19
20
# File 'lib/plain_query/builder.rb', line 16

def included(klass)
  klass.extend(builder_options)
  klass.extend(ClassMethods)
  klass.include(InstanceMethods)
end