Class List Method List File List

# Class: VertxWeb::Locale

Inherits:
  Object
  - Object
  - VertxWeb::Locale
  show all
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/locale.rb

## Class Method Summary (collapse)

- + (::VertxWeb::Locale) create(language = nil, country = nil, variant = nil)

## 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

### + (`::VertxWeb::Locale`) create(language = nil, country = nil, variant = nil)

Parameters:

- language (`String`) (defaults to: `nil`)
- country (`String`) (defaults to: `nil`)
- variant (`String`) (defaults to: `nil`)

Returns:

- (`::VertxWeb::Locale`)

Raises:

- (`ArgumentError`)

    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/locale.rb', line 19

    def self.create(language=nil,country=nil,variant=nil)
      if !block_given? && language == nil && country == nil && variant == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWeb::Locale.java_method(:create, []).call(),::VertxWeb::Locale)
      elsif language.class == String && !block_given? && country == nil && variant == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWeb::Locale.java_method(:create, [Java::java.lang.String.java_class]).call(language),::VertxWeb::Locale)
      elsif language.class == String && country.class == String && !block_given? && variant == 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(language,country),::VertxWeb::Locale)
      elsif language.class == String && country.class == String && variant.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(language,country,variant),::VertxWeb::Locale)
      end
      raise ArgumentError, "Invalid arguments when calling create(language,country,variant)"
    end

## Instance Method Details

### - (`String`) country

Returns the country as reported by the HTTP client.

Returns:

- (`String`) —
  variant

Raises:

- (`ArgumentError`)

    41
    42
    43
    44
    45
    46
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/locale.rb', line 41

    def country
      if !block_given?
        return @j_del.java_method(:country, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling country()"
    end

### - (`String`) language

Returns the language as reported by the HTTP client.

Returns:

- (`String`) —
  language

Raises:

- (`ArgumentError`)

    33
    34
    35
    36
    37
    38
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/locale.rb', line 33

    def language
      if !block_given?
        return @j_del.java_method(:language, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling language()"
    end

### - (`String`) variant

Returns the variant as reported by the HTTP client.

Returns:

- (`String`) —
  variant

Raises:

- (`ArgumentError`)

    49
    50
    51
    52
    53
    54
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/locale.rb', line 49

    def variant
      if !block_given?
        return @j_del.java_method(:variant, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling variant()"
    end