Sha256: 0377746cd0d24c09ce6283689b44128da233454c753efed5db0e6f46ce189837

Contents?: true

Size: 736 Bytes

Versions: 9

Compression:

Stored size: 736 Bytes

Contents

class Mechanize
  class Form
    # This class represents a file upload field found in a form.  To use this
    # class, set FileUpload#file_data= to the data of the file you want
    # to upload and FileUpload#mime_type= to the appropriate mime type
    # of the file.
    # See the example in EXAMPLES[link://files/EXAMPLES_txt.html]
    class FileUpload < Field
      attr_accessor :file_name # File name
      attr_accessor :mime_type # Mime Type (Optional)

      alias :file_data :value
      alias :file_data= :value=

        def initialize node, file_name
          @file_name = Util.html_unescape(file_name)
          @file_data = nil
          @node      = node
          super(node, @file_data)
        end
    end
  end
end

Version data entries

9 entries across 9 versions & 4 rubygems

Version Path
domo-0.0.4 vendor/bundle/ruby/1.9.1/gems/mechanize-1.0.0/lib/mechanize/form/file_upload.rb
aai10-mechanize-2.0.1.0 lib/mechanize/form/file_upload.rb
neocoin-mechanize-2.0.2 lib/mechanize/form/file_upload.rb
mechanize-2.0.1 lib/mechanize/form/file_upload.rb
mechanize-2.0 lib/mechanize/form/file_upload.rb
mechanize-2.0.pre.2 lib/mechanize/form/file_upload.rb
mechanize-2.0.pre.1 lib/mechanize/form/file_upload.rb
mechanize-1.0.1.beta.20110107104205 lib/mechanize/form/file_upload.rb
mechanize-1.0.0 lib/mechanize/form/file_upload.rb