class BaUpload::ErrorFile

Public Class Methods

new(mechanize_link) click to toggle source
# File lib/ba_upload/error_file.rb, line 3
def initialize(mechanize_link)
  @mechanize_link = mechanize_link
  @link = mechanize_link.href
end

Public Instance Methods

filename() click to toggle source
# File lib/ba_upload/error_file.rb, line 13
def filename
  @mechanize_link.text
end
read() click to toggle source
# File lib/ba_upload/error_file.rb, line 8
def read
  response = @mechanize_link.click
  response.xml.to_s
end
tempfile() click to toggle source
# File lib/ba_upload/error_file.rb, line 17
def tempfile
  tf = Tempfile.new(['error_file', '.xml'])
  tf.write(read)
  tf.flush
  tf
end