Sha256: 0a0a5640243128ef7306cbafbc0d9672a761e7be9f025bddb43a6869b5b4e20a

Contents?: true

Size: 498 Bytes

Versions: 1

Compression:

Stored size: 498 Bytes

Contents

module Surveygizmo
  class Client
    # Defines methods related to filtering search results
    # @see http://developer.surveygizmo.com/resources/filtering-and-browsing-results/
    module Filter
      
      # Format filters for the request querystring
      # TODO: Not yet recursive
      # @param filters [Hash] Filter(s) used to refine search
      def formatted_filters(filters = {})
        Hash[*filters.map{|key,value| ["filter[#{key}]", value]}.flatten]
      end
      
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
surveygizmo-0.0.1 lib/surveygizmo/client/filter.rb