Class: Appstats::SubResult

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/appstats/sub_result.rb

Instance Method Summary collapse

Instance Method Details

#==(o) ⇒ Object Also known as: eql?



29
30
31
# File 'lib/appstats/sub_result.rb', line 29

def ==(o)
   o.class == self.class && o.send(:state) == state
end

#context_filter_to_sObject



22
23
24
25
26
# File 'lib/appstats/sub_result.rb', line 22

def context_filter_to_s
  return "-- N/A --" if context_filter.nil?
  return "-- No Value --" if context_filter.empty?
  context_filter
end

#count_to_s(data = {}) ⇒ Object



14
15
16
# File 'lib/appstats/sub_result.rb', line 14

def count_to_s(data = {})
  Appstats::Result.calculate_count_to_s(count,data)
end

#total_countObject



9
10
11
12
# File 'lib/appstats/sub_result.rb', line 9

def total_count
  return 0 if result.nil?
  result.count
end

#total_count_to_s(data = {}) ⇒ Object



18
19
20
# File 'lib/appstats/sub_result.rb', line 18

def total_count_to_s(data = {})
  Appstats::Result.calculate_count_to_s(total_count,data)
end