Class: Graphene::Subtotals

Inherits:
ResultSet show all
Defined in:
lib/graphene/subtotals.rb

Overview

Calculates and contains the subtotals of each attr (or attr group). Inherits from Graphene::ResultSet. See LazyEnumerable, Graphene::Tablize and Graphene::OneDGraphs for more documentation.

Don’t create instance manually. Instead, use the Graphene.subtotals method, which will return a properly instantiated object.

Instance Attribute Summary

Attributes inherited from ResultSet

#attributes, #options, #resources

Instance Method Summary collapse

Methods inherited from ResultSet

#initialize, #max_result, #over, #to_s

Methods included from OneDGraphs

#bar_chart, #pie_chart, #side_bar_chart, #side_stacked_bar_chart, #spider_chart, #stacked_bar_chart

Methods included from Tablize

#tablize

Methods included from LazyEnumerable

#==, #===, #each, included

Constructor Details

This class inherits a constructor from Graphene::ResultSet

Instance Method Details

#percentages(opts = nil) ⇒ Object

Convert the percentages to subtotals



11
12
13
# File 'lib/graphene/subtotals.rb', line 11

def percentages(opts=nil)
  transmogrify(Percentages, opts)
end