Class: LdapConverters::SingleValue

Inherits:
Base
  • Object
show all
Defined in:
lib/ldap_converters.rb

Overview

Force LDAP value to be a single value instead of Array

Instance Attribute Summary

Attributes inherited from Base

#model

Instance Method Summary (collapse)

Methods inherited from Base

#initialize, #validate

Constructor Details

This class inherits a constructor from LdapConverters::Base

Instance Method Details

- (Object) read(v)



28
29
30
# File 'lib/ldap_converters.rb', line 28

def read(v)
  Array(v).first
end

- (Object) write(v)



31
32
33
# File 'lib/ldap_converters.rb', line 31

def write(v)
  Array(v)
end