class Dynamicloud::API::Criteria::GroupByClause
This class represents a GroupBy clause. @author Eleazar Gomez @version 1.0.0 @since 8/23/15
Public Class Methods
new(attributes)
click to toggle source
Constructor tha builds this condition @param attributes attributes in group by clause
# File lib/dynamic_criteria.rb, line 388 def initialize(attributes) @attributes = attributes end
Public Instance Methods
to_record_string(parent)
click to toggle source
This method will return a String of this condition @param parent this is the parent of this condition @return a json
# File lib/dynamic_criteria.rb, line 395 def to_record_string(parent) group_by = '"groupBy": [' attrs = '' @attributes.each do |attr| attrs = attrs + (attrs.length == 0 ? '' : ',') + '"' + attr + '"'; end group_by + attrs + ']' end