Class: Ldaptic::Schema::NameDescObsoleteDefiniton

Inherits:
AbstractDefinition show all
Defined in:
lib/ldaptic/schema.rb

Overview

Serves as an abstract base class for the many definitions that feature name, desc, and obsolete attributes.

Instance Attribute Summary

Attributes inherited from AbstractDefinition

#attributes, #oid

Instance Method Summary collapse

Methods inherited from AbstractDefinition

attr_ldap_boolean, attr_ldap_reader, #initialize, #inspect, #to_s

Constructor Details

This class inherits a constructor from Ldaptic::Schema::AbstractDefinition

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Ldaptic::Schema::AbstractDefinition

Instance Method Details

#namesObject

The definition’s name(s), always returned as an array for programmatic ease.



156
157
158
# File 'lib/ldaptic/schema.rb', line 156

def names
  Array(name)
end

#verbose_nameObject

The longest (and hopefully most descriptive) name. Used by human_attribute_name.



162
163
164
# File 'lib/ldaptic/schema.rb', line 162

def verbose_name
  names.sort_by { |n| n.size }.last
end