Sha256: 5a54f71d45b10e40166a09abc857b92be5bc763af2a02d3e8aeeb99a79c31373
Contents?: true
Size: 713 Bytes
Versions: 29
Compression:
Stored size: 713 Bytes
Contents
module CFoundry::V2 module ModelMagic module QueryValueHelper class QueryValue attr_accessor :comparator, :value def initialize(params) self.comparator = params[:comparator] || params[:comp] || ':' self.value = params[:value] end def to_s "#{comparator_string}#{value_string}" end def comparator_string if comparator.downcase == 'in' || value.is_a?(Array) " IN " else comparator end end def value_string if value.is_a? Array value.join(",") else value end end end end end end
Version data entries
29 entries across 29 versions & 3 rubygems