Class: BOTR::Multipart
- Inherits:
-
Object
show all
- Defined in:
- lib/botr/http/multipart.rb
Instance Method Summary
collapse
Constructor Details
#initialize(data_path = "", boundary = nil) ⇒ Multipart
Returns a new instance of Multipart.
8
9
10
11
12
13
|
# File 'lib/botr/http/multipart.rb', line 8
def initialize(data_path = "", boundary = nil)
@data_path = data_path
@boundary = boundary
build_stream
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args) ⇒ Object
19
20
21
|
# File 'lib/botr/http/multipart.rb', line 19
def method_missing(*args)
@stream.send(*args)
end
|
Instance Method Details
15
16
17
|
# File 'lib/botr/http/multipart.rb', line 15
def close
@stream.close! unless @stream.closed?
end
|
#respond_to?(meth) ⇒ Boolean
23
24
25
|
# File 'lib/botr/http/multipart.rb', line 23
def respond_to?(meth)
@stream.respond_to?(meth) || super(meth)
end
|