Class: ActiveDirectory::FieldType::DnArray

Inherits:
Object
  • Object
show all
Defined in:
lib/bsb_active_directory/field_type/dn_array.rb

Class Method Summary collapse

Class Method Details

.decode(dn_array) ⇒ Object

Decodes a list of DNs into the objects that they are



34
35
36
37
# File 'lib/bsb_active_directory/field_type/dn_array.rb', line 34

def self.decode(dn_array)
  # How to do user or group?
  Base.find(:all, distinguishedname: dn_array)
end

.encode(obj_array) ⇒ Object

Encodes an array of objects into a list of dns



27
28
29
# File 'lib/bsb_active_directory/field_type/dn_array.rb', line 27

def self.encode(obj_array)
  obj_array.collect(&:dn)
end