Class: VertxWebCommon::FormDataPart
- Inherits:
-
Object
- Object
- VertxWebCommon::FormDataPart
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb
Overview
A form data part of a MultipartForm.
Constant Summary
- @@j_api_type =
Object.new
Class Method Summary (collapse)
- + (Boolean) accept?(obj)
- + (Object) j_api_type
- + (Object) j_class
- + (Object) unwrap(obj)
- + (Object) wrap(obj)
Instance Method Summary (collapse)
-
- (true, false) attribute?
true when this part is an attribute.
-
- (true, false) file_upload?
true when this part is a file upload.
-
- (String) filename
The filename when this part is a file upload otherwise null.
-
- (String) media_type
The media type when this part is a file upload otherwise null.
-
- (String) name
The name.
-
- (String) pathname
The pathname when this part is a file upload otherwise null.
-
- (true, false) text?
Whether the file upload is text or binary when this part is a file upload otherwise null.
-
- (String) value
The value when the part for a form attribute otherwise null.
Class Method Details
+ (Boolean) accept?(obj)
17 18 19 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 17 def @@j_api_type.accept?(obj) obj.class == FormDataPart end |
+ (Object) j_api_type
26 27 28 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 26 def self.j_api_type @@j_api_type end |
+ (Object) j_class
29 30 31 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 29 def self.j_class Java::IoVertxExtWebMultipart::FormDataPart.java_class end |
+ (Object) unwrap(obj)
23 24 25 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 23 def @@j_api_type.unwrap(obj) obj.j_del end |
+ (Object) wrap(obj)
20 21 22 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 20 def @@j_api_type.wrap(obj) FormDataPart.new(obj) end |
Instance Method Details
- (true, false) attribute?
Returns
true
when this part is an attribute
43 44 45 46 47 48 49 50 51 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 43 def attribute? if !block_given? if @cached_is_attribute != nil return @cached_is_attribute end return @cached_is_attribute = @j_del.java_method(:isAttribute, []).call() end raise ArgumentError, "Invalid arguments when calling attribute?()" end |
- (true, false) file_upload?
Returns
true
when this part is a file upload
53 54 55 56 57 58 59 60 61 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 53 def file_upload? if !block_given? if @cached_is_file_upload != nil return @cached_is_file_upload end return @cached_is_file_upload = @j_del.java_method(:isFileUpload, []).call() end raise ArgumentError, "Invalid arguments when calling file_upload?()" end |
- (String) filename
Returns the filename when this part is a file upload otherwise
null
73 74 75 76 77 78 79 80 81 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 73 def filename if !block_given? if @cached_filename != nil return @cached_filename end return @cached_filename = @j_del.java_method(:filename, []).call() end raise ArgumentError, "Invalid arguments when calling filename()" end |
- (String) media_type
Returns the media type when this part is a file upload otherwise
null
93 94 95 96 97 98 99 100 101 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 93 def media_type if !block_given? if @cached_media_type != nil return @cached_media_type end return @cached_media_type = @j_del.java_method(:mediaType, []).call() end raise ArgumentError, "Invalid arguments when calling media_type()" end |
- (String) name
Returns the name
33 34 35 36 37 38 39 40 41 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 33 def name if !block_given? if @cached_name != nil return @cached_name end return @cached_name = @j_del.java_method(:name, []).call() end raise ArgumentError, "Invalid arguments when calling name()" end |
- (String) pathname
Returns the pathname when this part is a file upload otherwise
null
83 84 85 86 87 88 89 90 91 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 83 def pathname if !block_given? if @cached_pathname != nil return @cached_pathname end return @cached_pathname = @j_del.java_method(:pathname, []).call() end raise ArgumentError, "Invalid arguments when calling pathname()" end |
- (true, false) text?
Returns whether the file upload is text or binary when this part is a file upload otherwise
null
103 104 105 106 107 108 109 110 111 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 103 def text? if !block_given? if @cached_is_text != nil return @cached_is_text end return @cached_is_text = @j_del.java_method(:isText, []).call() end raise ArgumentError, "Invalid arguments when calling text?()" end |
- (String) value
Returns the value when the part for a form attribute otherwise
null
63 64 65 66 67 68 69 70 71 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-common/form_data_part.rb', line 63 def value if !block_given? if @cached_value != nil return @cached_value end return @cached_value = @j_del.java_method(:value, []).call() end raise ArgumentError, "Invalid arguments when calling value()" end |