def method_missing(missing_method, *args, &block)
      method_name, reference_identifier = missing_method.to_s.split("_", 2)
      type = full(method_name)
      Surveyor::Parser.raise_error( "\"#{type}\" is not a surveyor method." )if !%w(survey survey_translation survey_section question_group question dependency dependency_condition answer validation validation_condition).include?(type)

      Surveyor::Parser.rake_trace(reference_identifier.blank? ? "#{type} #{args.map(&:inspect).join ', '}" : "#{type}_#{reference_identifier} #{args.map(&:inspect).join ', '}",
                                  block_models.include?(type) ? 2 : 0)

      # check for blocks
      Surveyor::Parser.raise_error "A #{type.humanize.downcase} should take a block" if block_models.include?(type) && !block_given?
      Surveyor::Parser.raise_error "A #{type.humanize.downcase} doesn't take a block" if !block_models.include?(type) && block_given?

      # parse and build
      type.classify.constantize.new.extend("SurveyorParser#{type.classify}Methods".constantize).parse_and_build(context, args, method_name, reference_identifier)

      # evaluate and clear context for block models
      if block_models.include?(type)
        self.instance_eval(&block)
        if type == 'survey'
          resolve_dependency_condition_references
          resolve_question_correct_answers
          report_lost_and_duplicate_references
          report_missing_default_locale
          Surveyor::Parser.rake_trace("", -2)
          if context[:survey].save
            Surveyor::Parser.rake_trace "Survey saved."
          else
            Surveyor::Parser.raise_error "Survey not saved: #{context[:survey].errors.full_messages.join(", ")}"
          end
        else
          Surveyor::Parser.rake_trace("", -2)
          context[type.to_sym].clear(context)
        end
      end
    end
def method_missing(missing_method, *args, &block)
      method_name, reference_identifier = missing_method.to_s.split("_", 2)
      type = full(method_name)
      Surveyor::Parser.raise_error( "\"#{type}\" is not a surveyor method." )if !%w(survey survey_translation survey_section question_group question dependency dependency_condition answer validation validation_condition).include?(type)

      Surveyor::Parser.rake_trace(reference_identifier.blank? ? "#{type} #{args.map(&:inspect).join ', '}" : "#{type}_#{reference_identifier} #{args.map(&:inspect).join ', '}",
                                  block_models.include?(type) ? 2 : 0)

      # check for blocks
      Surveyor::Parser.raise_error "A #{type.humanize.downcase} should take a block" if block_models.include?(type) && !block_given?
      Surveyor::Parser.raise_error "A #{type.humanize.downcase} doesn't take a block" if !block_models.include?(type) && block_given?

      # parse and build
      type.classify.constantize.new.extend("SurveyorParser#{type.classify}Methods".constantize).parse_and_build(context, args, method_name, reference_identifier)

      # evaluate and clear context for block models
      if block_models.include?(type)
        self.instance_eval(&block)
        if type == 'survey'
          resolve_dependency_condition_references
          resolve_question_correct_answers
          report_lost_and_duplicate_references
          report_missing_default_locale
          Surveyor::Parser.rake_trace("", -2)
          if context[:survey].save
            Surveyor::Parser.rake_trace "Survey saved."
          else
            Surveyor::Parser.raise_error "Survey not saved: #{context[:survey].errors.full_messages.join(", ")}"
          end
        else
          Surveyor::Parser.rake_trace("", -2)
          context[type.to_sym].clear(context)
        end
      end
    end
This method_missing does all the heavy lifting for the DSL