Sha256: 23e944a71d289b68c9868167d124b4b1389d39032cb473c7feeeed91cb76bf89
Contents?: true
Size: 638 Bytes
Versions: 13
Compression:
Stored size: 638 Bytes
Contents
# frozen_string_literal: true 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
13 entries across 13 versions & 1 rubygems