Class: ROM::LDAP::RestrictionDSL Private
- Defined in:
- lib/rom/ldap/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.
Instance Attribute Summary
Attributes inherited from DSL
#picked_relations, #relations, #schema
Instance Method Summary collapse
-
#`(value) ⇒ AST
Parse a raw query to AST.
- #call(&block) ⇒ Object private
Methods inherited from DSL
#initialize, #respond_to_missing?
Constructor Details
This class inherits a constructor from ROM::LDAP::DSL
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &block) ⇒ Attribute, Type (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.
35 36 37 38 39 40 41 |
# File 'lib/rom/ldap/restriction_dsl.rb', line 35 def method_missing(meth, *args, &block) if schema.key?(meth) schema[meth] else type(meth) end end |
Instance Method Details
#`(value) ⇒ AST
Parse a raw query to AST.
26 27 28 |
# File 'lib/rom/ldap/restriction_dsl.rb', line 26 def `(value) Parsers::FilterSyntax.new(value, EMPTY_ARRAY).call end |
#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.
12 13 14 |
# File 'lib/rom/ldap/restriction_dsl.rb', line 12 def call(&block) instance_exec(select_relations(block.parameters), &block) end |