Top Level Namespace

Defined Under Namespace

Modules: LibLouis

Constant Summary collapse

ROOT =
File.expand_path("../..", __dir__)
VENDOR_ROOT =
File.join(ROOT, "vendor", "liblouis")
VENDOR_SOURCE =
File.join(VENDOR_ROOT, "liblouis")
TABLES_PATH =
File.join(VENDOR_ROOT, "tables").tr("\\", "/")
DATA_PATH =
File.dirname(VENDOR_ROOT).tr("\\", "/")

Instance Method Summary collapse

Instance Method Details

#c_string(value) ⇒ Object

Encode paths as C strings in the header so the shell never splits them.



25
26
27
# File 'ext/liblouis/extconf.rb', line 25

def c_string(value)
  '"' + value.b.bytes.map { |byte| format("\\%03o", byte) }.join + '"'
end