Module: UdbGen::AdocHelpers

Extended by:
T::Sig
Includes:
Kernel
Included in:
GenExtPdfOptions, TemplateHelpers
Defined in:
lib/udb-gen/adoc_helpers.rb

Instance Method Summary collapse

Instance Method Details

#state_preamble_adoc(version) ⇒ Object



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'lib/udb-gen/adoc_helpers.rb', line 52

def state_preamble_adoc(version)
  case version.state
  when "ratified"
    <<~ADOC
      [WARNING]
      .This document is in the link:http://riscv.org/spec-state[Ratified state]
      ====
      No changes are allowed. Any desired or needed changes can be the subject of a
      follow-on new extension. Ratified extensions are never revised
      ====
    ADOC
  when "frozen"
    <<~ADOC
      [WARNING]
      This document is in the http://riscv.org/spec-state[Frozen state].
      ====
      Change is extremely unlikely.
      A high threshold will be used, and a change will only occur because of some truly
      critical issue being identified during the public review cycle.
      Any other desired or needed changes can be the subject of a follow-on new extension.
      ====
    ADOC
  when "development"
    <<~ADOC
      [WARNING]
      This document is in the http://riscv.org/spec-state[Development state].
      ====
      Change should be expected
      ====
    ADOC
  when "nonstandard-released"
    <<~ADOC
      [WARNING]
      This document is the Release State.
      ====
      Changes will result in a new version number.
      ====
    ADOC
  else
    raise "Unknown state: #{version.state}"
  end
end

#state_revmark(version) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/udb-gen/adoc_helpers.rb', line 16

def state_revmark(version)
  case version.state
  when "ratified"
    <<~STATE
      This document is in the http://riscv.org/spec-state[Ratified state] + \\
      + \\
      No changes are allowed. + \\
      Any desired or needed changes can be the subject of a follow-on new extension. + \\
      Ratified extensions are never revised. + \\
    STATE
  when "frozen"
    <<~STATE
      This document is in the http://riscv.org/spec-state[Frozen state]. + \\
      + \\
      Change is extremely unlikely. + \\
      A high threshold will be used, and a change will only occur because of some truly + \\
      critical issue being identified during the public review cycle. + \\
      Any other desired or needed changes can be the subject of a follow-on new extension. + \\
    STATE
  when "development"
    <<~STATE
      This document is in the http://riscv.org/spec-state[Development state]. + \\
      + \\
      Change should be expected + \\
    STATE
  when "nonstandard-released"
    <<~STATE
      This document is the Release State. Changes will result in a new version number. + \\
    STATE
  else
    raise "Unknown state: #{version.state}"
  end
end