lib/carrierwave/mount.rb
##
# === Returns
#
# [Hash{Symbol => CarrierWave}] what uploaders are mounted on which columns
#
Returns
[Hash{Symbol => CarrierWave}] what uploaders are mounted on which columns
Returns [ Hash { Symbol = > CarrierWave } ] what uploaders are mounted on which columns
def mount_base(column, uploader=nil, options={}, &block)
      include CarrierWave::Mount::Extension
      uploader = build_uploader(uploader, &block)
      uploaders[column.to_sym] = uploader
      uploader_options[column.to_sym] = options
      class_eval <<-RUBY, __FILE__, __LINE__+1
        def #{column}; super; end
        def #{column}=(new_file); super; end
      RUBY
      mod = Module.new
      include mod
      mod.class_eval <<-RUBY, __FILE__, __LINE__+1
        def #{column}?
          _mounter(:#{column}).present?
        end
        def remove_#{column}
          _mounter(:#{column}).remove
        end
        def remove_#{column}!
          _mounter(:#{column}).remove!
        end
        def remove_#{column}=(value)
          _mounter(:#{column}).remove = value
        end
        def remove_#{column}?
          _mounter(:#{column}).remove?
        end
        def store_#{column}!
          _mounter(:#{column}).store!
        end
        def #{column}_integrity_errors
          _mounter(:#{column}).integrity_errors
        end
        def #{column}_processing_errors
          _mounter(:#{column}).processing_errors
        end
        def #{column}_download_errors
          _mounter(:#{column}).download_errors
        end
        def mark_remove_#{column}_false
          _mounter(:#{column}).remove = false
        end
      RUBY
    end
def mount_base ( column , uploader = nil , options = { } , & block ) include CarrierWave :: Mount :: Extension uploader = build_uploader ( uploader , & block ) uploaders [ column . to_sym ] = uploader uploader_options [ column . to_sym ] = options class_eval <<-RUBY , __FILE__ , __LINE__ + 1 
        def  #{ column } ; super; end
        def  #{ column } =(new_file); super; end
       RUBY mod = Module . new include mod mod . class_eval <<-RUBY , __FILE__ , __LINE__ + 1 

        def  #{ column } ?
          _mounter(: #{ column } ).present?
        end

        def remove_ #{ column } 
          _mounter(: #{ column } ).remove
        end

        def remove_ #{ column } !
          _mounter(: #{ column } ).remove!
        end

        def remove_ #{ column } =(value)
          _mounter(: #{ column } ).remove = value
        end

        def remove_ #{ column } ?
          _mounter(: #{ column } ).remove?
        end

        def store_ #{ column } !
          _mounter(: #{ column } ).store!
        end

        def  #{ column } _integrity_errors
          _mounter(: #{ column } ).integrity_errors
        end

        def  #{ column } _processing_errors
          _mounter(: #{ column } ).processing_errors
        end

        def  #{ column } _download_errors
          _mounter(: #{ column } ).download_errors
        end

        def mark_remove_ #{ column } _false
          _mounter(: #{ column } ).remove = false
        end
       RUBY end
Returns
[Hash{Symbol => CarrierWave}] what uploaders are mounted on which columns
Returns [ Hash { Symbol = > CarrierWave } ] what uploaders are mounted on which columns
# Make sure to write over accessors directly defined on the class. # Simply super to the included module below.
column
uploader
options
block