Class: LdapConverters::Number
Overview
Force LDAP value to be single Fixnum number
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary (collapse)
Methods inherited from Base
Constructor Details
This class inherits a constructor from LdapConverters::Base
Instance Method Details
- (Object) read(v)
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/ldap_converters.rb', line 38 def read(v) if v.nil? return nil end if v.kind_of?(Array) && v.empty? return nil end Array(v).first.to_i end |
- (Object) write(v)
49 50 51 |
# File 'lib/ldap_converters.rb', line 49 def write(v) Array(v.to_s) end |