Class: BCP47::Tag
- Inherits:
-
Object
- Object
- BCP47::Tag
- Defined in:
- lib/bcp47/tag.rb
Instance Attribute Summary collapse
-
#language ⇒ Object
Returns the value of attribute language.
-
#region ⇒ Object
Returns the value of attribute region.
Instance Method Summary collapse
- #codes ⇒ Object
-
#initialize(code) ⇒ Tag
constructor
A new instance of Tag.
- #subtags ⇒ Object
Constructor Details
Instance Attribute Details
#language ⇒ Object
Returns the value of attribute language.
3 4 5 |
# File 'lib/bcp47/tag.rb', line 3 def language @language end |
#region ⇒ Object
Returns the value of attribute region.
3 4 5 |
# File 'lib/bcp47/tag.rb', line 3 def region @region end |
Instance Method Details
#codes ⇒ Object
11 12 13 |
# File 'lib/bcp47/tag.rb', line 11 def codes .map(&:code) end |
#subtags ⇒ Object
15 16 17 |
# File 'lib/bcp47/tag.rb', line 15 def [language, region].compact end |