Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/ebps/conversion/oebps.rb
Direct Known Subclasses
Constant Summary collapse
- UMLAUT_SUB =
{ 'Ä' => 'ae', 'ä' => 'ae', 'Ö' => 'oe', 'ö' => 'oe', 'Ü' => 'ue', 'ü' => 'ue', }
Instance Method Summary collapse
- #sortable ⇒ Object
- #sortable! ⇒ Object
-
#to_xs ⇒ Object
overwrite Builder’s to_xs.
Instance Method Details
#sortable ⇒ Object
21 22 23 24 25 |
# File 'lib/ebps/conversion/oebps.rb', line 21 def sortable dupl = dup dupl.sortable! dupl end |
#sortable! ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'lib/ebps/conversion/oebps.rb', line 26 def sortable! res = downcase! UMLAUT_SUB.each do |ptrn, repl| tmp = gsub! Regexp.new(ptrn, 'U'), repl res ||= tmp end res end |
#to_xs ⇒ Object
overwrite Builder’s to_xs
35 36 37 |
# File 'lib/ebps/conversion/oebps.rb', line 35 def to_xs gsub('&', '&').gsub('<', '<').gsub('>', '>') end |