Method: SugarCRM::Module.find

Defined in:
lib/sugarcrm/module.rb

.find(name, session = nil) ⇒ Object

Finds a module by name, or klass name



157
158
159
160
161
162
163
164
165
# File 'lib/sugarcrm/module.rb', line 157

def find(name, session=nil)
  session ||= SugarCRM.session
  register_all(session) unless initialized?
  session.modules.each do |m|
    return m if m.name  == name
    return m if m.klass == name
  end
  false
end