Method: LOM::Mapper#ldap_list
- Defined in:
- lib/lom/mapper.rb
#ldap_list(name, body = nil, &block) ⇒ Object
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/lom/mapper.rb', line 134 def ldap_list(name, body=nil, &block) if body && block raise ArgumentError elsif body.nil? && block.nil? raise ArgumentError elsif block body = block end @__ldap_list << name define_singleton_method(name) do |*args| filter = body.call(*args) LOM::Filtered.new(filter, src: self) end end |