Class: ROM::LDAP::ProjectionDSL

Inherits:
DSL
  • Object
show all
Defined in:
lib/rom/ldap/projection_dsl.rb

Overview

Projection DSL used in reading API (select, select_append etc.)

See Also:

Instance Attribute Summary

Attributes inherited from DSL

#picked_relations, #relations, #schema

Instance Method Summary collapse

Methods inherited from DSL

#call, #initialize

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) ⇒ 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.



22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/rom/ldap/projection_dsl.rb', line 22

def method_missing(meth, *args, &block)
  if schema.key?(meth)
    schema[meth]
  else
    type = type(meth)

    if type
      ::ROM::LDAP::Attribute[type].value(args[0])
    else
      super
    end
  end
end

Instance Method Details

#respond_to_missing?(name, include_private = false) ⇒ Boolean

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.

Returns:

  • (Boolean)


15
16
17
# File 'lib/rom/ldap/projection_dsl.rb', line 15

def respond_to_missing?(name, include_private = false)
  super || type(name)
end