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)

- + (Object) create(language = nil, country = nil, variant = nil)

## Instance Method Summary (collapse)

- - (Object) country
- - (Locale) initialize(j_del) constructor
  A new instance of Locale.
- - (Object) j_del
- - (Object) language
- - (Object) variant

## Constructor Details

### - (`Locale`) initialize(j_del)

Returns a new instance of Locale

    7
    8
    9
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/locale.rb', line 7

    def initialize(j_del)
      @j_del = j_del
    end

## Class Method Details

### + (`Object`) create(language = nil, country = nil, variant = nil)

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

### - (`Object`) country

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

### - (`Object`) j_del

    12
    13
    14
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/locale.rb', line 12

    def j_del
      @j_del
    end

### - (`Object`) 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

### - (`Object`) 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