# module ActiveLdap::AttributeMethods::Query

### Protected Instance Methods

attribute?(attr) click to toggle source

    # File lib/active_ldap/attribute_methods/query.rb, line 26
    def attribute?(attr)
      return get_attribute_as_query(attr)
    end

false_value?(value) click to toggle source

    # File lib/active_ldap/attribute_methods/query.rb, line 21
    def false_value?(value)
      value.nil? or value == false or value == [] or
        value == "false" or value == "FALSE" or value == ""
    end

get_attribute_as_query(name, force_array=false) click to toggle source

    # File lib/active_ldap/attribute_methods/query.rb, line 12
    def get_attribute_as_query(name, force_array=false)
      name, value = get_attribute_before_type_cast(name, force_array)
      if force_array
        value.collect {|x| !false_value?(x)}
      else
        !false_value?(value)
      end
    end