Class: ROM::SQL::RestrictionDSL Private
- Defined in:
- lib/rom/sql/restriction_dsl.rb
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.
Direct Known Subclasses
Instance Method Summary collapse
- #call(&block) ⇒ Object private
Constructor Details
This class inherits a constructor from ROM::SQL::DSL
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &block) ⇒ Object (private)
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.
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/rom/sql/restriction_dsl.rb', line 23 def method_missing(meth, *args, &block) if schema.key?(meth) schema[meth] else type = type(meth) if type ::ROM::SQL::Function.new(type) else ::Sequel::VIRTUAL_ROW.__send__(meth, *args, &block) end end end |
Instance Method Details
#call(&block) ⇒ 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.
10 11 12 13 14 15 16 17 18 |
# File 'lib/rom/sql/restriction_dsl.rb', line 10 def call(&block) arg, kwargs = select_relations(block.parameters) if kwargs.nil? instance_exec(arg, &block) else instance_exec(**kwargs, &block) end end |