lib/client_success/resources/base.rb
def create_resource(res_type, value)
        if res_type.is_a?(Array)
          invalid_attribute_value(Array, value) unless value.is_a?(Array)
          value.map { |item| instantiate_object_for(res_type.first, item) }
        else
          instantiate_object_for(res_type, value)
        end
      end
# Process a value into a ClientSuccess::Resources object
# or an Array of objects.
#
# @param [klass_name] String
# @param [Hash or Array] value
# @return [Array or ClientSuccess::Resources::Base]
#
Process a value into a ClientSuccess::Resources object
or an Array of objects.
Process a value into a ClientSuccess :: Resources object or an Array of objects .
def create_resource(res_type, value)
        if res_type.is_a?(Array)
          invalid_attribute_value(Array, value) unless value.is_a?(Array)
          value.map { |item| instantiate_object_for(res_type.first, item) }
        else
          instantiate_object_for(res_type, value)
        end
      end
def create_resource ( res_type , value ) if res_type . is_a? ( Array ) invalid_attribute_value ( Array , value ) unless value . is_a? ( Array ) value . map { | item | instantiate_object_for ( res_type . first , item ) } else instantiate_object_for ( res_type , value ) end end
Process a value into a ClientSuccess::Resources object
or an Array of objects.
Process a value into a ClientSuccess :: Resources object or an Array of objects .
None
Array or ClientSuccess::Resources::Base
res_type
value
None