Class: Ucode::Audit::Emitter::PlaneEmitter

Inherits:
Object
  • Object
show all
Includes:
Repo::AtomicWrites
Defined in:
lib/ucode/audit/emitter/plane_emitter.rb

Overview

Writes <face_dir>/planes/<N>.json — one rollup per Unicode plane that has any coverage.

The browser fetches these when the user switches to a plane-grouped view; cheaper than iterating every block.

Instance Method Summary collapse

Methods included from Repo::AtomicWrites

#same_content?, #to_pretty_json, #write_atomic

Instance Method Details

#emit(face_dir, plane) ⇒ Boolean

Returns true if written, false if skipped.

Parameters:

Returns:

  • (Boolean)

    true if written, false if skipped



22
23
24
25
# File 'lib/ucode/audit/emitter/plane_emitter.rb', line 22

def emit(face_dir, plane)
  write_atomic(Paths.plane_under(face_dir, plane.plane),
               to_pretty_json(plane.to_hash))
end