Class: Hierogloss::HieroglyphRow

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

Overview

:nodoc:

Constant Summary collapse

UNLINKED =
{}

Instance Attribute Summary

Attributes inherited from Row

#raw_cells

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

Instance Method Details

#cell_to_kramdown(cell) ⇒ Object



74
75
76
77
78
79
80
81
82
83
# File 'lib/hierogloss/gloss.rb', line 74

def cell_to_kramdown(cell)
  cell.to_linear_hieroglyphs.chars.map do |c|
    gardiner = Dictionary.sign_to_gardiner(c)
    unless gardiner.nil? || UNLINKED[c]
      search_link("Signe:#{gardiner}", c)
    else
      Kramdown::Element.new(:text, c)
    end
  end
end

#cellsObject



70
71
72
# File 'lib/hierogloss/gloss.rb', line 70

def cells
  @cells ||= raw_cells.map {|c| Hierogloss::MdC.parse(c) }
end

#class_attrObject



66
67
68
# File 'lib/hierogloss/gloss.rb', line 66

def class_attr
  'hgls-h'
end