Class: Hierogloss::TransliterationRow

Inherits:
Row
  • Object
show all
Defined in:
lib/hierogloss/gloss.rb

Overview

:nodoc:

Constant Summary collapse

JR_TRANSLITERATION =
{
  "A" => "ꜣ",
  "i" => "j",
  "a" => "ꜥ",
  "H" => "ḥ",
  "x" => "ḫ",
  "X" => "ẖ",
  "S" => "š",
  "q" => "ḳ",
  "K" => "ḳ",
  "T" => "ṯ",
  "D" => "ḏ"
}

Instance Attribute Summary

Attributes inherited from Row

#raw_cells

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Row

#attributes, #initialize, #search_link, #span?, #to_kramdown

Constructor Details

This class inherits a constructor from Hierogloss::Row

Class Method Details

.fancy(tl) ⇒ Object



102
103
104
# File 'lib/hierogloss/gloss.rb', line 102

def self.fancy(tl)
  tl.chars.map {|c| JR_TRANSLITERATION[c] || c }.join
end

Instance Method Details

#cell_to_kramdown(cell) ⇒ Object



110
111
112
113
# File 'lib/hierogloss/gloss.rb', line 110

def cell_to_kramdown(cell)
  fancy = self.class.fancy(cell)
  search_link(Dictionary.headword(cell), fancy)
end

#class_attrObject



106
107
108
# File 'lib/hierogloss/gloss.rb', line 106

def class_attr
  'hgls-l'
end