Class: I18n::Locale::Tag::Simple
- Inherits:
-
Object
- Object
- I18n::Locale::Tag::Simple
show all
- Includes:
- Parents
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/i18n-1.12.0/lib/i18n/locale/tag/simple.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Parents
#parent, #parents, #self_and_parents
Constructor Details
#initialize(*tag) ⇒ Simple
Returns a new instance of Simple.
17
18
19
|
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/i18n-1.12.0/lib/i18n/locale/tag/simple.rb', line 17
def initialize(*tag)
@tag = tag.join('-').to_sym
end
|
Instance Attribute Details
Returns the value of attribute tag.
15
16
17
|
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/i18n-1.12.0/lib/i18n/locale/tag/simple.rb', line 15
def tag
@tag
end
|
Class Method Details
8
9
10
|
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/i18n-1.12.0/lib/i18n/locale/tag/simple.rb', line 8
def tag(tag)
new(tag)
end
|
Instance Method Details
21
22
23
|
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/i18n-1.12.0/lib/i18n/locale/tag/simple.rb', line 21
def subtags
@subtags = tag.to_s.split('-').map!(&:to_s)
end
|
33
34
35
|
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/i18n-1.12.0/lib/i18n/locale/tag/simple.rb', line 33
def to_a
subtags
end
|
29
30
31
|
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/i18n-1.12.0/lib/i18n/locale/tag/simple.rb', line 29
def to_s
tag.to_s
end
|
25
26
27
|
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/i18n-1.12.0/lib/i18n/locale/tag/simple.rb', line 25
def to_sym
tag
end
|