handlers/kinetic_submission_update_attribute_v1/handler/vendor/ars-models-0.0.7/lib/ars_models/form.rb
# Internal JAPI representation of the com.kd.ars.models.structure.ArsForm object
Internal JAPI representation of the com.kd.ars.models.structure.ArsForm object
Internal JAPI representation of the com . kd . ars . models . structure . ArsForm object
def generate(ars_form, options={})
      raise 'Invalid com.kd.ars.models.structure.ArsForm.' unless ars_form.is_a?(ArsForm)
      validate_options(options, :optional => [:context, :fields, :indexes, :name, :permissions, :sort_fields])
      @ars_form = ars_form
      (options[:fields] || []).collect! do |field|
        field.is_a?(Field) ? field : Field.new(field)
      end
      [:context, :fields, :indexes, :name, :permissions, :sort_fields].each do |key|
        self.send("#{key}=", options[key]) if options.has_key?(key)
      end
    end
def generate ( ars_form , options = { } ) raise 'Invalid com.kd.ars.models.structure.ArsForm.' unless ars_form . is_a? ( ArsForm ) validate_options ( options , :optional => [ :context , :fields , :indexes , :name , :permissions , :sort_fields ] ) @ars_form = ars_form ( options [ :fields ] || [ ] ) . collect! do | field | field . is_a? ( Field ) ? field : Field . new ( field ) end [ :context , :fields , :indexes , :name , :permissions , :sort_fields ] . each do | key | self . send ( "#{key}=" , options [ key ] ) if options . has_key? ( key ) end end
Internal JAPI representation of the com.kd.ars.models.structure.ArsForm object
Internal JAPI representation of the com . kd . ars . models . structure . ArsForm object
# Raise an error if the provided object is not actually a JAPI entry # Validate the passed options # Store the JAPI ArsField object # Convert any hash defined fields as fields # If there were options passed in with the ArsForm object, overwrite the object with those values
ars_form
<not_specific>
options
<not_specific>