Class: ActiveLdap::Schema::Attribute

### Home Classes Methods

### In Files

- lib/active_ldap/schema.rb

### Parent

ActiveLdap::Schema::Entry

### Methods

- ::new
- #binary?
- #binary_required?
- #directory_operation?
- #human_attribute_description
- #human_attribute_name
- #normalize_value
- #read_only?
- #single_value?
- #syntax
- #syntax_description
- #to_hash
- #type_cast
- #valid?
- #validate

### Included Modules

- ActiveLdap::GetTextSupport
- ActiveLdap::HumanReadable

### Files

- USAGE

### Class/Module Index

Quicksearch

- ActiveLdap
- ActiveLdap::ActionController
- ActiveLdap::ActionController::LdapBenchmarking
- ActiveLdap::Acts
- ActiveLdap::Acts::Tree
- ActiveLdap::Acts::Tree::ClassMethods
- ActiveLdap::Adapter
- ActiveLdap::Adapter::Base
- ActiveLdap::Adapter::Jndi
- ActiveLdap::Adapter::JndiConnection
- ActiveLdap::Adapter::JndiConnection::ModifyRecord
- ActiveLdap::Adapter::JndiConnection::Scope
- ActiveLdap::Adapter::Ldap
- ActiveLdap::Adapter::Ldap::Method
- ActiveLdap::Adapter::Ldap::Method::Base
- ActiveLdap::Adapter::Ldap::Method::Plain
- ActiveLdap::Adapter::Ldap::Method::SSL
- ActiveLdap::Adapter::Ldap::Method::TLS
- ActiveLdap::Adapter::NetLdap
- ActiveLdap::Association
- ActiveLdap::Association::BelongsTo
- ActiveLdap::Association::BelongsToMany
- ActiveLdap::Association::Children
- ActiveLdap::Association::Collection
- ActiveLdap::Association::HasMany
- ActiveLdap::Association::HasManyUtils
- ActiveLdap::Association::HasManyWrap
- ActiveLdap::Association::Proxy
- ActiveLdap::Associations
- ActiveLdap::Associations::ClassMethods
- ActiveLdap::AttributeMethods
- ActiveLdap::AttributeMethods::BeforeTypeCast
- ActiveLdap::AttributeMethods::Dirty
- ActiveLdap::AttributeMethods::Query
- ActiveLdap::AttributeMethods::Read
- ActiveLdap::AttributeMethods::Write
- ActiveLdap::Attributes
- ActiveLdap::Attributes::ClassMethods
- ActiveLdap::Attributes::Normalizable
- ActiveLdap::Callbacks
- ActiveLdap::Callbacks::ClassMethods
- ActiveLdap::Command
- ActiveLdap::Compatible
- ActiveLdap::Configuration
- ActiveLdap::Configuration::ClassMethods
- ActiveLdap::Connection
- ActiveLdap::Connection::ClassMethods
- ActiveLdap::DN
- ActiveLdap::DistinguishedName
- ActiveLdap::DistinguishedName::Parser
- ActiveLdap::EntryAttribute
- ActiveLdap::Escape
- ActiveLdap::Generators
- ActiveLdap::Generators::ModelGenerator
- ActiveLdap::Generators::ScaffoldGenerator
- ActiveLdap::GetText
- ActiveLdap::GetText::Parser
- ActiveLdap::GetTextSupport
- ActiveLdap::Helper
- ActiveLdap::HumanReadable
- ActiveLdap::HumanReadable::ClassMethods
- ActiveLdap::LDIF
- ActiveLdap::LdapError
- ActiveLdap::Ldif
- ActiveLdap::Ldif::AddRecord
- ActiveLdap::Ldif::Attribute
- ActiveLdap::Ldif::Attributes
- ActiveLdap::Ldif::ChangeRecord
- ActiveLdap::Ldif::ChangeRecord::Control
- ActiveLdap::Ldif::ContentRecord
- ActiveLdap::Ldif::DeleteRecord
- ActiveLdap::Ldif::ModifyDNRecord
- ActiveLdap::Ldif::ModifyNameRecord
- ActiveLdap::Ldif::ModifyRDNRecord
- ActiveLdap::Ldif::ModifyRecord
- ActiveLdap::Ldif::ModifyRecord::AddOperation
- ActiveLdap::Ldif::ModifyRecord::DeleteOperation
- ActiveLdap::Ldif::ModifyRecord::Operation
- ActiveLdap::Ldif::ModifyRecord::ReplaceOperation
- ActiveLdap::Ldif::Parser
- ActiveLdap::Ldif::Record
- ActiveLdap::Ldif::Scanner
- ActiveLdap::LogSubscriber
- ActiveLdap::ObjectClass
- ActiveLdap::ObjectClass::ClassMethods
- ActiveLdap::Operations
- ActiveLdap::Operations::ClassOnlyDelete
- ActiveLdap::Operations::ClassOnlyUpdate
- ActiveLdap::Operations::Common
- ActiveLdap::Operations::Delete
- ActiveLdap::Operations::Find
- ActiveLdap::Operations::LDIF
- ActiveLdap::Operations::LDIF::AddRecordLoadable
- ActiveLdap::Operations::LDIF::ContentRecordLoadable
- ActiveLdap::Operations::LDIF::DeleteRecordLoadable
- ActiveLdap::Operations::LDIF::ModifyNameRecordLoadable
- ActiveLdap::Operations::LDIF::ModifyRecordLoadable
- ActiveLdap::Operations::LDIF::ModifyRecordLoadable::AddOperationModifiable
- ActiveLdap::Operations::LDIF::ModifyRecordLoadable::DeleteOperationModifiable
- ActiveLdap::Operations::LDIF::ModifyRecordLoadable::ReplaceOperationModifiable
- ActiveLdap::Operations::Update
- ActiveLdap::Persistence
- ActiveLdap::Populate
- ActiveLdap::Railtie
- ActiveLdap::Railties
- ActiveLdap::Railties::ControllerRuntime
- ActiveLdap::Railties::ControllerRuntime::ClassMethods
- ActiveLdap::Schema
- ActiveLdap::Schema::Attribute
- ActiveLdap::Schema::Entry
- ActiveLdap::Schema::ObjectClass
- ActiveLdap::Schema::Syntax
- ActiveLdap::Schema::Syntaxes
- ActiveLdap::Schema::Syntaxes::Base
- ActiveLdap::Schema::Syntaxes::BitString
- ActiveLdap::Schema::Syntaxes::Boolean
- ActiveLdap::Schema::Syntaxes::CountryString
- ActiveLdap::Schema::Syntaxes::DirectoryString
- ActiveLdap::Schema::Syntaxes::DistinguishedName
- ActiveLdap::Schema::Syntaxes::GeneralizedTime
- ActiveLdap::Schema::Syntaxes::Integer
- ActiveLdap::Schema::Syntaxes::JPEG
- ActiveLdap::Schema::Syntaxes::NameAndOptionalUID
- ActiveLdap::Schema::Syntaxes::NumericString
- ActiveLdap::Schema::Syntaxes::OID
- ActiveLdap::Schema::Syntaxes::OtherMailbox
- ActiveLdap::Schema::Syntaxes::PostalAddress
- ActiveLdap::Schema::Syntaxes::PrintableString
- ActiveLdap::Schema::Syntaxes::TelephoneNumber
- ActiveLdap::UserPassword
- ActiveLdap::UserPassword::Salt
- ActiveLdap::Validations
- ActiveLdap::XML
- ActiveLdap::Xml
- ActiveLdap::Xml::Serializer
- LDAP
- LDAP::Conn
- LDAP::Mod
- Net
- Net::LDAP
- Net::LDAP::Entry
- ActionView
- ActionView::Base
- URI
- URI::LDAPS
- Object
- Timeout

No matching classes.

# ActiveLdap::Schema::Attribute

### Attributes

super_attribute[R]

### Public Class Methods

new(name, schema) click to toggle source

    # File lib/active_ldap/schema.rb, line 392
    def initialize(name, schema)
      super(name, schema, "attributeTypes")
    end

### Public Instance Methods

binary?() click to toggle source

binary?

Returns true if the given attribute's syntax is X-NOT-HUMAN-READABLE or X-BINARY-TRANSFER-REQUIRED

    # File lib/active_ldap/schema.rb, line 417
    def binary?
      @binary
    end

binary_required?() click to toggle source

binary_required?

Returns true if the value MUST be transferred in binary

    # File lib/active_ldap/schema.rb, line 424
    def binary_required?
      @binary_required
    end

directory_operation?() click to toggle source

directory_operation?

Returns true if an attribute is directory operation. It means that USAGE contains directoryOperation.

    # File lib/active_ldap/schema.rb, line 432
    def directory_operation?
      @directory_operation
    end

human_attribute_description() click to toggle source

    # File lib/active_ldap/schema.rb, line 471
    def human_attribute_description
      self.class.human_attribute_description(self)
    end

human_attribute_name() click to toggle source

    # File lib/active_ldap/schema.rb, line 467
    def human_attribute_name
      self.class.human_attribute_name(self)
    end

normalize_value(value) click to toggle source

    # File lib/active_ldap/schema.rb, line 459
    def normalize_value(value)
      normalize_value_internal(value, false)
    end

read_only?() click to toggle source

read_only?

Returns true if an attribute is read-only NO-USER-MODIFICATION

    # File lib/active_ldap/schema.rb, line 400
    def read_only?
      @read_only
    end

single_value?() click to toggle source

single_value?

Returns true if an attribute can only have one value defined SINGLE-VALUE

    # File lib/active_ldap/schema.rb, line 409
    def single_value?
      @single_value
    end

syntax() click to toggle source

    # File lib/active_ldap/schema.rb, line 436
    def syntax
      @derived_syntax
    end

syntax_description() click to toggle source

    # File lib/active_ldap/schema.rb, line 463
    def syntax_description
      send_to_syntax(nil, :description)
    end

to_hash() click to toggle source

    # File lib/active_ldap/schema.rb, line 475
    def to_hash
      {
        :read_only => read_only?,
        :single_value => single_value?,
        :binary => binary?,
        :binary_required => binary_required?,
        :directory_operation => directory_operation?,
        :syntax => syntax,
        :syntax_description => syntax_description,
      }
    end

type_cast(value) click to toggle source

    # File lib/active_ldap/schema.rb, line 455
    def type_cast(value)
      send_to_syntax(value, :type_cast, value)
    end

valid?(value) click to toggle source

    # File lib/active_ldap/schema.rb, line 440
    def valid?(value)
      validate(value).nil?
    end

validate(value) click to toggle source

    # File lib/active_ldap/schema.rb, line 444
    def validate(value)
      error_info = validate_each_value(value)
      return error_info if error_info
      begin
        normalize_value(value)
        nil
      rescue AttributeValueInvalid
        [$!.message]
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.