Sha256: 7a0e639d8d8c703b970bac8cfe6d98835d0701e72d687fa7e75a78b38cdfe538

Contents?: true

Size: 523 Bytes

Versions: 10

Compression:

Stored size: 523 Bytes

Contents

module SugarCRM; class Connection
  # Retrieves the list of modules available to the current user logged into the system.  
  def get_available_modules
    login! unless logged_in?
    json = <<-EOF
      {
        "session": "#{@sugar_session_id}"
      }
    EOF
    
    json.gsub!(/^\s{6}/,'')
    mods = send!(:get_available_modules, json)["modules"]
    modules = []
    mods.each do |mod|
      modules << Module.new(@session, mod)
    end
    modules
  end
  
  alias :get_modules :get_available_modules
  
end; end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
sugarcrm_emp-0.10.5 lib/sugarcrm/connection/api/get_available_modules.rb
sugarcrm_emp-0.10.1 lib/sugarcrm/connection/api/get_available_modules.rb
sugarcrm_emp-0.10.0 lib/sugarcrm/connection/api/get_available_modules.rb
sugarcrm-0.9.18 lib/sugarcrm/connection/api/get_available_modules.rb
sugarcrm-0.9.17 ./lib/sugarcrm/connection/api/get_available_modules.rb
sugarcrm-0.9.16 ./lib/sugarcrm/connection/api/get_available_modules.rb
sugarcrm-0.9.15 ./lib/sugarcrm/connection/api/get_available_modules.rb
sugarcrm-0.9.14 ./lib/sugarcrm/connection/api/get_available_modules.rb
sugarcrm-0.9.13 ./lib/sugarcrm/connection/api/get_available_modules.rb
sugarcrm-0.9.12 ./lib/sugarcrm/connection/api/get_available_modules.rb