def getters
      name = @name
      options = @options
      @klass.send(:define_method, name) do
        ivar = :"@_attachment_#{name}"
        attachment = instance_variable_get(ivar)

        if attachment.nil?
          attachment = Attachment.new(name, self, options)
          instance_variable_set(ivar, attachment)
        end

        return attachment
      end
    end
def getters
      name = @name
      options = @options
      @klass.send(:define_method, name) do
        ivar = :"@_attachment_#{name}"
        attachment = instance_variable_get(ivar)

        if attachment.nil?
          attachment = Attachment.new(name, self, options)
          instance_variable_set(ivar, attachment)
        end

        return attachment
      end
    end
Define the getter.

 Usage:

   attacher.getters