Sha256: 2a7149bb3af803ad3ff740a88c4975d906b95421dd3c7396b25a7d83bb455e34
Contents?: true
Size: 607 Bytes
Versions: 17
Compression:
Stored size: 607 Bytes
Contents
module RocketChat module Messages # # Support methods for *.list calls # module ListSupport private def build_list_body(offset, count, sort, fields, query = nil) body = {} body[:offset] = offset.to_i if offset.is_a? Integer body[:count] = count.to_i if count.is_a? Integer [[:sort, sort], [:fields, fields], [:query, query]].each do |field, val| case val when Hash body[field] = val.to_json when String body[field] = val end end body end end end end
Version data entries
17 entries across 17 versions & 1 rubygems