lib/sugarcrm/connection/api/get_entries_count.rb in sugarcrm-0.9.7 vs lib/sugarcrm/connection/api/get_entries_count.rb in sugarcrm-0.9.8
- old
+ new
@@ -1,20 +1,20 @@
module SugarCRM; class Connection
-# Retrieves the specified number of records in a module.
-def get_entries_count(module_name, query, opts={})
- login! unless logged_in?
- options = {
- :deleted => 0
- }.merge! opts
+ # Retrieves the specified number of records in a module.
+ def get_entries_count(module_name, query, opts={})
+ login! unless logged_in?
+ options = {
+ :deleted => 0
+ }.merge! opts
- json = <<-EOF
- {
- \"session\": \"#{@session}\"\,
- \"module_name\": \"#{module_name}\"\,
- \"query\": \"#{query}\"\,
- \"deleted\": #{options[:deleted]}
- }
- EOF
- json.gsub!(/^\s{6}/,'')
- send!(:get_entries_count, json)
-end
+ json = <<-EOF
+ {
+ \"session\": \"#{@session}\"\,
+ \"module_name\": \"#{module_name}\"\,
+ \"query\": \"#{query}\"\,
+ \"deleted\": #{options[:deleted]}
+ }
+ EOF
+ json.gsub!(/^\s{6}/,'')
+ send!(:get_entries_count, json)
+ end
end; end
\ No newline at end of file