Class: ActiveDataFrame::GroupProxy
- Inherits:
-
Object
- Object
- ActiveDataFrame::GroupProxy
- Defined in:
- lib/active_data_frame/group_proxy.rb
Instance Attribute Summary collapse
-
#groups ⇒ Object
Returns the value of attribute groups.
Instance Method Summary collapse
- #average(column_name) ⇒ Object
- #count ⇒ Object
-
#initialize(groups) ⇒ GroupProxy
constructor
A new instance of GroupProxy.
- #max(column_name) ⇒ Object
- #min(column_name) ⇒ Object
- #sum(column_name) ⇒ Object
Constructor Details
#initialize(groups) ⇒ GroupProxy
Returns a new instance of GroupProxy.
4 5 6 |
# File 'lib/active_data_frame/group_proxy.rb', line 4 def initialize(groups) self.groups = groups end |
Instance Attribute Details
#groups ⇒ Object
Returns the value of attribute groups.
3 4 5 |
# File 'lib/active_data_frame/group_proxy.rb', line 3 def groups @groups end |
Instance Method Details
#average(column_name) ⇒ Object
20 21 22 |
# File 'lib/active_data_frame/group_proxy.rb', line 20 def average(column_name) aggregate('average', column_name) end |
#count ⇒ Object
24 25 26 |
# File 'lib/active_data_frame/group_proxy.rb', line 24 def count aggregate('count') end |
#max(column_name) ⇒ Object
12 13 14 |
# File 'lib/active_data_frame/group_proxy.rb', line 12 def max(column_name) aggregate('maximum', column_name) end |
#min(column_name) ⇒ Object
8 9 10 |
# File 'lib/active_data_frame/group_proxy.rb', line 8 def min(column_name) aggregate('minimum', column_name) end |
#sum(column_name) ⇒ Object
16 17 18 |
# File 'lib/active_data_frame/group_proxy.rb', line 16 def sum(column_name) aggregate('sum', column_name) end |