lib/decanter/collection_detection.rb
# leveraging the approach used in the [fast JSON API gem](https://github.com/Netflix/fast_jsonapi#collection-serialization)
leveraging the approach used in the [fast JSON API gem]
leveraging the approach used in the [ fast JSON API gem ]
def collection?(args, collection_option = nil)
        raise(ArgumentError, "#{name}: Unknown collection option value: #{collection_option}") unless [true, false, nil].include? collection_option
        return collection_option unless collection_option.nil?
        args.respond_to?(:size) && !args.respond_to?(:each_pair)
      end
def collection? ( args , collection_option = nil ) raise ( ArgumentError , "#{name}: Unknown collection option value: #{collection_option}" ) unless [ true , false , nil ] . include? collection_option return collection_option unless collection_option . nil? args . respond_to? ( :size ) && ! args . respond_to? ( :each_pair ) end
leveraging the approach used in the [fast JSON API gem](https://github.com/Netflix/fast_jsonapi#collection-serialization)
leveraging the approach used in the [ fast JSON API gem ] ( https : // github . com / Netflix / fast_jsonapi#collection - serialization )
args
<not_specific>
collection_option
<not_specific>