Source file obuilder_job.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module Spec = struct
  type t = {
    spec : [`Contents of string]
  } [@@deriving yojson]

  let init b { spec } =
    let module B = Raw.Builder.OBuilder in
    match spec with
    | `Contents contents -> B.spec_set b contents

  let read r =
    let module R = Raw.Reader.OBuilder in
    let spec = `Contents (R.spec_get r) in
    { spec }
end