Class: Buble::HTTP::FilePart

Inherits:
Struct
  • Object
show all
Defined in:
lib/buble/http.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#close_afterObject

Returns the value of attribute close_after

Returns:

  • (Object)

    the current value of close_after



14
15
16
# File 'lib/buble/http.rb', line 14

def close_after
  @close_after
end

#content_typeObject

Returns the value of attribute content_type

Returns:

  • (Object)

    the current value of content_type



14
15
16
# File 'lib/buble/http.rb', line 14

def content_type
  @content_type
end

#filenameObject

Returns the value of attribute filename

Returns:

  • (Object)

    the current value of filename



14
15
16
# File 'lib/buble/http.rb', line 14

def filename
  @filename
end

#ioObject

Returns the value of attribute io

Returns:

  • (Object)

    the current value of io



14
15
16
# File 'lib/buble/http.rb', line 14

def io
  @io
end

Instance Method Details

#closeObject



15
16
17
# File 'lib/buble/http.rb', line 15

def close
  io.close if close_after && io.respond_to?(:close) && !io.closed?
end