class I18n::Locale::Tag

Overview

A locale tag.

This class allows to manipulate locale tags and locale tag parents.

Defined in:

i18n/locale/tag.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(tag : String) #

Instance Method Detail

def ==(other : self) #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.


def parent : self | Nil #

Returns the direct parent tag or nil if none is available.


def parents : Array(self) #

Returns all the available parent tags for the considered locale tags.

An empty array is returned if the considered locale tags does not have any parents.


def to_s : String #
Description copied from class Object

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.