def attributes(*fields_name, **options, &block)
      if options.include? :except
        @fields = resolve_model_reflections.reject do |field|
          options[:except].include? field.to_sym
        end
      elsif options.include? :append

        @fields += options[:append]
      else

        # Check for valid field names
        fields_name.each do |name|
          unless @fields.include? name.to_s
            raise ArgumentError, "can't find '#{name}' field for model '#{model}'."
          end
        end
        # set new value for fields
        @fields = fields_name.map(&:to_s) unless fields_name.empty?
      end

      @fields.concat(block.call.map(&:to_s)) if block_given?
    end
def attributes(*fields_name, **options, &block)
      if options.include? :except
        @fields = resolve_model_reflections.reject do |field|
          options[:except].include? field.to_sym
        end
      elsif options.include? :append

        @fields += options[:append]
      else

        # Check for valid field names
        fields_name.each do |name|
          unless @fields.include? name.to_s
            raise ArgumentError, "can't find '#{name}' field for model '#{model}'."
          end
        end
        # set new value for fields
        @fields = fields_name.map(&:to_s) unless fields_name.empty?
      end

      @fields.concat(block.call.map(&:to_s)) if block_given?
    end
Base class for all the DSL property classes to be
 used as the yielded object inside each section DSL
 scope.

 For example the below code will yield an instance of
 one of this class children.

  in_index do
    # This will yield an instance of this class child
  end

 The most important note in this class is that all the public
 methods that their name starts with an underscore (_) not meant to
 be used as DSL.
 Allow user to specify an array of model attributes to be used
 in respected section. For example attributes to show as header
 columns in index section