Class: PlainQuery::BuilderOptions
- Inherits:
-
Module
- Object
- Module
- PlainQuery::BuilderOptions
- Defined in:
- lib/plain_query/builder_options.rb
Instance Method Summary collapse
- #define_model(model) ⇒ Object
-
#initialize(model: nil) ⇒ BuilderOptions
constructor
A new instance of BuilderOptions.
Constructor Details
#initialize(model: nil) ⇒ BuilderOptions
Returns a new instance of BuilderOptions.
5 6 7 |
# File 'lib/plain_query/builder_options.rb', line 5 def initialize(model: nil) define_model(model) end |
Instance Method Details
#define_model(model) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/plain_query/builder_options.rb', line 9 def define_model(model) module_exec(model) do |model_name| define_method(:model) do model_name end end end |