Class: TwitterCldr::Localized::LocalizedArray
Instance Attribute Summary
#base_obj, #formatter, #locale
Instance Method Summary
collapse
#initialize, localize
Instance Method Details
#code_points_to_string ⇒ Object
12
13
14
|
# File 'lib/twitter_cldr/localized/localized_array.rb', line 12
def code_points_to_string
::Utils::CodePoints.to_string(base_obj)
end
|
#each ⇒ Object
37
38
39
40
41
42
43
|
# File 'lib/twitter_cldr/localized/localized_array.rb', line 37
def each
if block_given?
@base_obj.each { |val| yield val }
else
@base_obj.to_enum
end
end
|
25
26
27
|
# File 'lib/twitter_cldr/localized/localized_array.rb', line 25
def formatter_const
nil
end
|
#sort ⇒ Object
16
17
18
|
# File 'lib/twitter_cldr/localized/localized_array.rb', line 16
def sort
::Collation::Collator.new(locale).sort(base_obj).localize
end
|
#sort! ⇒ Object
20
21
22
23
|
# File 'lib/twitter_cldr/localized/localized_array.rb', line 20
def sort!
::Collation::Collator.new(locale).sort!(base_obj)
self
end
|
#to_a ⇒ Object
29
30
31
|
# File 'lib/twitter_cldr/localized/localized_array.rb', line 29
def to_a
@base_obj.dup
end
|
#to_sentence ⇒ Object
33
34
35
|
# File 'lib/twitter_cldr/localized/localized_array.rb', line 33
def to_sentence
::Formatters::ListFormatter.new(locale).format(base_obj)
end
|
#to_yaml(options = {}) ⇒ Object
45
46
47
|
# File 'lib/twitter_cldr/localized/localized_array.rb', line 45
def to_yaml(options = {})
::Utils::YAML.dump(@base_obj, options)
end
|