Class: ActiveDataFrame::GroupProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/active_data_frame/group_proxy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#groupsObject

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

#countObject



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