Class: ActiveDirectory::Computer

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

Constant Summary

Constants inherited from Base

Base::NIL_FILTER

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#==, cache?, #changed?, class_name, clear_cache, connected?, create, decode_field, #destroy, disable_cache, enable_cache, encode_field, error, error?, error_code, exists?, find, find_all, find_cached_results, find_first, from_dn, #get_attr, get_field_type, #initialize, make_filter, make_filter_from_hash, method_missing, #method_missing, #move, #new_record?, parse_finder_spec, #reload, #save, #set_attr, setup, #sid, #to_ary, #update_attribute, #update_attributes, #valid_attribute?

Constructor Details

This class inherits a constructor from ActiveDirectory::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ActiveDirectory::Base

Class Method Details

.filterObject

:nodoc:



23
24
25
# File 'lib/bsb_active_directory/computer.rb', line 23

def self.filter # :nodoc:
  Net::LDAP::Filter.eq(:objectClass, 'computer')
end

.required_attributesObject

:nodoc:



27
28
29
# File 'lib/bsb_active_directory/computer.rb', line 27

def self.required_attributes # :nodoc:
  { objectClass: %w[top person organizationalPerson user computer] }
end

Instance Method Details

#hostnameObject



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

def hostname
  dNSHostName || name
end