class TwitterCldr::Shared::PropertySet

Attributes

properties_hash[R]

Public Class Methods

new(properties_hash) click to toggle source
# File lib/twitter_cldr/shared/property_set.rb, line 18
def initialize(properties_hash)
  @properties_hash = properties_hash
end

Public Instance Methods

age() click to toggle source
# File lib/twitter_cldr/shared/property_set.rb, line 22
def age
  properties_hash.fetch('Age', ['Unassigned'])
end
bidi_paired_bracket_type() click to toggle source
# File lib/twitter_cldr/shared/property_set.rb, line 36
def bidi_paired_bracket_type
  properties_hash['Bidi_Paired_Bracket_Type'] ||= [
    BidiBrackets.bracket_types['N']
  ]
end
block() click to toggle source
# File lib/twitter_cldr/shared/property_set.rb, line 42
def block
  properties_hash['Block'] ||= ['No_Block']
end
east_asian_width() click to toggle source
# File lib/twitter_cldr/shared/property_set.rb, line 46
def east_asian_width
  properties_hash['East_Asian_Width'] ||= ['N']
end
general_category() click to toggle source
# File lib/twitter_cldr/shared/property_set.rb, line 74
def general_category
  properties_hash.fetch('General_Category', [])
end
grapheme_cluster_break() click to toggle source
# File lib/twitter_cldr/shared/property_set.rb, line 50
def grapheme_cluster_break
  properties_hash['Grapheme_Cluster_Break'] ||= ['Other']
end
hangul_syllable_type() click to toggle source
# File lib/twitter_cldr/shared/property_set.rb, line 54
def hangul_syllable_type
  properties_hash['Hangul_Syllable_Type'] ||= ['Not_Applicable']
end
indic_positional_category() click to toggle source
# File lib/twitter_cldr/shared/property_set.rb, line 58
def indic_positional_category
  properties_hash['Indic_Positional_Category'] ||= ['NA']
end
indic_syllabic_category() click to toggle source
# File lib/twitter_cldr/shared/property_set.rb, line 62
def indic_syllabic_category
  properties_hash['Indic_Syllabic_Category'] ||= ['Other']
end
jamo_short_name() click to toggle source
# File lib/twitter_cldr/shared/property_set.rb, line 66
def jamo_short_name
  properties_hash['Jamo_Short_Name'] ||= ['<none>']
end
joining_type() click to toggle source
# File lib/twitter_cldr/shared/property_set.rb, line 26
def joining_type
  properties_hash['Joining_Type'] ||= if general_category.empty?
    [ArabicShaping.joining_type_for_general_category('xx')]
  else
    general_category.map do |gc|
      ArabicShaping.joining_type_for_general_category(gc)
    end
  end
end
line_break() click to toggle source
# File lib/twitter_cldr/shared/property_set.rb, line 70
def line_break
  properties_hash['Line_Break'] ||= ['XX']
end
script() click to toggle source
# File lib/twitter_cldr/shared/property_set.rb, line 82
def script
  properties_hash['Script'] ||= ['Unknown']
end
script_extensions() click to toggle source
# File lib/twitter_cldr/shared/property_set.rb, line 78
def script_extensions
  properties_hash['Script_Extensions'] ||= ['<script>']
end
sentence_break() click to toggle source
# File lib/twitter_cldr/shared/property_set.rb, line 86
def sentence_break
  properties_hash['Sentence_Break'] ||= ['Other']
end
word_break() click to toggle source
# File lib/twitter_cldr/shared/property_set.rb, line 90
def word_break
  properties_hash['Word_Break'] ||= ['Other']
end