Class: VertxWeb::Locale
- Inherits:
-
Object
- Object
- VertxWeb::Locale
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/locale.rb
Direct Known Subclasses
Constant Summary
- @@j_api_type =
Object.new
Class Method Summary (collapse)
- + (Boolean) accept?(obj)
- + (::VertxWeb::Locale) create(*args)
- + (Object) j_api_type
- + (Object) j_class
- + (Object) unwrap(obj)
- + (Object) wrap(obj)
Instance Method Summary (collapse)
-
- (String) country
Returns the country as reported by the HTTP client.
-
- (String) language
Returns the language as reported by the HTTP client.
-
- (String) variant
Returns the variant as reported by the HTTP client.
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/locale.rb', line 17 def @@j_api_type.accept?(obj) obj.class == Locale end |
+ (::VertxWeb::Locale) create + (::VertxWeb::Locale) create(language) + (::VertxWeb::Locale) create(language, country) + (::VertxWeb::Locale) create(language, country, variant)
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/locale.rb', line 69 def self.create(*args) if !block_given? && args[0] == nil && args[1] == nil && args[2] == nil return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWeb::Locale.java_method(:create, []).call(),::VertxWeb::Locale) elsif args[0].class == String && !block_given? && args[1] == nil && args[2] == nil return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWeb::Locale.java_method(:create, [Java::java.lang.String.java_class]).call(args[0]),::VertxWeb::Locale) elsif args[0].class == String && args[1].class == String && !block_given? && args[2] == nil return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWeb::Locale.java_method(:create, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(args[0],args[1]),::VertxWeb::Locale) elsif args[0].class == String && args[1].class == String && args[2].class == String && !block_given? return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWeb::Locale.java_method(:create, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(args[0],args[1],args[2]),::VertxWeb::Locale) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling create(#{args[0]},#{args[1]},#{args[2]})" end 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/locale.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/locale.rb', line 29 def self.j_class Java::IoVertxExtWeb::Locale.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/locale.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/locale.rb', line 20 def @@j_api_type.wrap(obj) Locale.new(obj) end |
Instance Method Details
- (String) country
Returns the country as reported by the HTTP client.
35 36 37 38 39 40 41 42 43 44 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/locale.rb', line 35 def country if !block_given? return @j_del.java_method(:country, []).call() end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling country()" end end |
- (String) language
Returns the language as reported by the HTTP client.
88 89 90 91 92 93 94 95 96 97 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/locale.rb', line 88 def language if !block_given? return @j_del.java_method(:language, []).call() end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling language()" end end |
- (String) variant
Returns the variant as reported by the HTTP client.
48 49 50 51 52 53 54 55 56 57 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web/locale.rb', line 48 def variant if !block_given? return @j_del.java_method(:variant, []).call() end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling variant()" end end |