Class: SiSU_Processing_Settings::ProcessingSettings

Inherits:
Object
  • Object
show all
Defined in:
lib/sisu/se_processing.rb

Direct Known Subclasses

SiSU_Env::ProcessingSettings

Instance Method Summary collapse

Constructor Details

#initialize(md) ⇒ ProcessingSettings

Returns a new instance of ProcessingSettings.



59
60
61
# File 'lib/sisu/se_processing.rb', line 59

def initialize(md)
  @md=md
end

Instance Method Details

#buildObject



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
# File 'lib/sisu/se_processing.rb', line 76

def build
  def ocn?
    if cmd_rc_act[:ocn][:set]==:on
      true
    elsif cmd_rc_act[:ocn][:set]==:off
      false
    elsif doc_rc.is_a?(Method) \
    and defined? doc_rc.ocn? \
    and doc_rc.toc? ==:off
      false
    elsif env_rc.build.ocn? ==:off
      false
    else
      true
    end
  end
  def plaintext_ocn?
    if cmd_rc_act[:txt_ocn][:set]==:on \
    or cmd_rc_act[:ocn][:set]==:on
      true
    elsif cmd_rc_act[:txt_ocn][:set]==:off \
    or cmd_rc_act[:ocn][:set]==:off
      false
    elsif doc_rc.is_a?(Method) \
    and defined? doc_rc.ocn? \
    and doc_rc.toc? ==:off
      false
    elsif env_rc.build.ocn? ==:off
      false
    else
      true
    end
  end
  def odt_ocn?
    if cmd_rc_act[:odt_ocn][:set]==:on \
    or cmd_rc_act[:ocn][:set]==:on
      true
    elsif cmd_rc_act[:odt_ocn][:set]==:off \
    or cmd_rc_act[:ocn][:set]==:off
      false
    elsif doc_rc.is_a?(Method) \
    and defined? doc_rc.ocn? \
    and doc_rc.toc? ==:off
      false
    elsif env_rc.build.ocn? ==:off
      false
    else
      true
    end
  end
  def html_strict?
    if cmd_rc_act[:html_strict][:set]==:on
      true
    elsif cmd_rc_act[:html_strict][:set]==:off
      false
    elsif doc_rc.is_a?(Method) \
    and defined? doc_rc.html_strict? \
    and doc_rc.html_strict? ==:on
      true
    else
      false
    end
  end
  def toc?
    if cmd_rc_act[:toc][:set]==:on
      true
    elsif cmd_rc_act[:toc][:set]==:off
      false
    elsif doc_rc.is_a?(Method) \
    and defined? doc_rc.toc? \
    and doc_rc.toc? ==:off
      false
    elsif env_rc.build.toc? ==:off
      false
    else
      true
    end
  end
  def manifest?
    if cmd_rc_act[:manifest][:set]==:on
      true
    elsif cmd_rc_act[:manifest][:set]==:off
      false
    elsif doc_rc.is_a?(Method) \
    and defined? doc_rc.manifest? \
    and doc_rc.manifest? ==:off
      false
    elsif env_rc.build.manifest? ==:off
      false
    else
      true
    end
  end
  def links_to_manifest?
    if cmd_rc_act[:links_to_manifest][:set]==:on
      true
    elsif cmd_rc_act[:links_to_manifest][:set]==:off
      false
    elsif doc_rc.is_a?(Method) \
    and defined? doc_rc.links_to_manifest? \
    and doc_rc.links_to_manifest? ==:off
      false
    elsif env_rc.build.links_to_manifest? ==:off
      false
    else
      true
    end
  end
  def metadata?
    if cmd_rc_act[:metadata][:set]==:on
      true
    elsif cmd_rc_act[:metadata][:set]==:off
      false
    elsif doc_rc.is_a?(Method) \
    and defined? doc_rc.metadata? \
    and doc_rc.metadata? ==:off
      false
    elsif env_rc.build.metadata? ==:off
      false
    else
      true
    end
  end
  def minitoc?
    if html_top_band? == false #one form of navigation necessary
      true
    elsif cmd_rc_act[:minitoc][:set]==:on
      true
    elsif cmd_rc_act[:minitoc][:set]==:off
      false
    elsif doc_rc.is_a?(Method) \
    and defined? doc_rc.minitoc? \
    and doc_rc.minitoc? ==:off
      false
    elsif env_rc.build.minitoc? ==:off
      false
    else
      false
    end
  end
  def manifest_minitoc?
    if html_top_band? == false #one form of navigation necessary
      true
    elsif cmd_rc_act[:manifest_minitoc][:set]==:on \
    || cmd_rc_act[:minitoc][:set]==:on
      true
    elsif cmd_rc_act[:manifest_minitoc][:set]==:off \
    || cmd_rc_act[:minitoc][:set]==:off
      false
    elsif doc_rc.is_a?(Method) \
    and defined? doc_rc.manifest_minitoc? \
    and (doc_rc.manifest_minitoc? ==:off \
    || doc_rc.minitoc? ==:off)
      false
    elsif env_rc.build.manifest_minitoc? ==:off \
    || env_rc.build.minitoc? ==:off
      false
    elsif minitoc? == false
      false
    else
      false
    end
  end
  def html_minitoc?
    if html_top_band? == false #one form of navigation necessary
      true
    elsif cmd_rc_act[:html_minitoc][:set]==:on \
    || cmd_rc_act[:minitoc][:set]==:on
      true
    elsif cmd_rc_act[:html_minitoc][:set]==:off \
    || cmd_rc_act[:minitoc][:set]==:off
      false
    elsif doc_rc.is_a?(Method) \
    and defined? doc_rc.html_minitoc? \
    and (doc_rc.html_minitoc? ==:off \
    || doc_rc.minitoc? ==:off)
      false
    elsif env_rc.build.html_minitoc? ==:off \
    || env_rc.build.minitoc? ==:off
      false
    elsif minitoc? == false
      false
    else
      false
    end
  end
  def html_top_band?
    if cmd_rc_act[:html_top_band][:set]==:on
      true
    elsif cmd_rc_act[:html_top_band][:set]==:off
      false
    elsif doc_rc.is_a?(Method) \
    and defined? doc_rc.html_top_band? \
    and doc_rc.html_top_band? ==:off
      false
    elsif env_rc.build.html_top_band? ==:off
      false
    else
      true
    end
  end
  def html_navigation?
    if cmd_rc_act[:html_navigation][:set]==:on
      true
    elsif cmd_rc_act[:html_navigation][:set]==:off
      false
    elsif doc_rc.is_a?(Method) \
    and defined? doc_rc.html_navigation? \
    and doc_rc.html_navigation? ==:off
      false
    elsif env_rc.build.html_navigation? ==:off
      false
    else
      true
    end
  end
  def html_navigation_bar?
    if cmd_rc_act[:html_navigation_bar][:set]==:on
      true
    elsif cmd_rc_act[:html_navigation_bar][:set]==:off
      false
    elsif doc_rc.is_a?(Method) \
    and defined? doc_rc.html_navigation_bar? \
    and doc_rc.html_navigation_bar? ==:off
      false
    elsif env_rc.build.html_navigation_bar? ==:off
      false
    else
      false
    end
  end
  def search_form?
    if cmd_rc_act[:search_form][:set]==:on
      true
    elsif cmd_rc_act[:search_form][:set]==:off
      false
    elsif doc_rc.is_a?(Method) \
    and defined? doc_rc.html_search_form? \
    and doc_rc.search_form? ==:off
      false
    elsif env_rc.build.search_form? ==:off
      false
    else
      true
    end
  end
  def html_search_form?
    if cmd_rc_act[:html_search_form][:set]==:on \
    || cmd_rc_act[:search_form][:set]==:on
      true
    elsif cmd_rc_act[:html_search_form][:set]==:off \
    || cmd_rc_act[:search_form][:set]==:off
      false
    elsif doc_rc.is_a?(Method) \
    and defined? doc_rc.html_search_form? \
    and (doc_rc.html_search_form? ==:off \
    || doc_rc.search_form? ==:off)
      false
    elsif env_rc.build.html_search_form? ==:off \
    || env_rc.build.search_form? ==:off
      false
    elsif search_form? == false
      false
    else
      true
    end
  end
  def html_right_pane?
    if cmd_rc_act[:html_right_pane][:set]==:on
      true
    elsif cmd_rc_act[:html_right_pane][:set]==:off
      false
    elsif doc_rc.is_a?(Method) \
    and defined? doc_rc.html_right_pane? \
    and doc_rc.html_right_pane? ==:off
      false
    elsif env_rc.build.html_right_pane? ==:off
      false
    else
      true
    end
  end
  def segsubtoc?
    if cmd_rc_act[:segsubtoc][:set]==:on
      true
    elsif cmd_rc_act[:segsubtoc][:set]==:off
      false
    elsif doc_rc.is_a?(Method) \
    and defined? doc_rc.segsubtoc? \
    and doc_rc.segsubtoc? ==:off
      false
    elsif env_rc.build.segsubtoc? ==:off
      false
    else
      true
    end
  end
  self
end

#by?Boolean

Returns:

  • (Boolean)


439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
# File 'lib/sisu/se_processing.rb', line 439

def by?
  if dump?
    :dump
  elsif redirect?
    :redirect
  elsif by_language_code?
    :language
  elsif by_filetype?
    :filetype
  elsif by_filename?
    :filename
  else #recheck current default
    :language
  end
end

#by_filename?Boolean

Returns:

  • (Boolean)


405
406
407
408
409
410
411
412
413
414
415
416
# File 'lib/sisu/se_processing.rb', line 405

def by_filename?
  if cmd_rc_act[:output_by][:set] == :filename
    true
  elsif cmd_rc_act[:output_by][:set] == :language \
  or cmd_rc_act[:output_by][:set] == :filetype
    false
  elsif cmd_rc_act[:output_by][:set] == :filename
    true
  else
    env_rc.output_dir_structure.by_filename?
  end
end

#by_filetype?Boolean

Returns:

  • (Boolean)


393
394
395
396
397
398
399
400
401
402
403
404
# File 'lib/sisu/se_processing.rb', line 393

def by_filetype?
  if cmd_rc_act[:output_by][:set] == :filetype
    true
  elsif cmd_rc_act[:output_by][:set] == :language \
  or cmd_rc_act[:output_by][:set] == :filename
    false
  elsif cmd_rc_act[:output_by][:set] == :filetype
    true
  else
    env_rc.output_dir_structure.by_filetype?
  end
end

#by_language_code?Boolean

Returns:

  • (Boolean)


381
382
383
384
385
386
387
388
389
390
391
392
# File 'lib/sisu/se_processing.rb', line 381

def by_language_code?
  if cmd_rc_act[:output_by][:set] == :language
    true
  elsif cmd_rc_act[:output_by][:set] == :filetype \
  or cmd_rc_act[:output_by][:set] == :filename
    false
  elsif cmd_rc_act[:output_by][:set] == :language
    true
  else
    env_rc.output_dir_structure.by_language_code?
  end
end

#cmd_rc_actObject

command-line rc



73
74
75
# File 'lib/sisu/se_processing.rb', line 73

def cmd_rc_act #command-line rc
  @cmd_rc_act=@md.opt.opt_act
end

#cnf_rcObject

sisurc.yml



62
63
64
# File 'lib/sisu/se_processing.rb', line 62

def cnf_rc #sisurc.yml
  @rc=SiSU_Env::GetInit.new.sisu_yaml.rc
end

#doc_rcObject

document rc, make instructions



68
69
70
71
72
# File 'lib/sisu/se_processing.rb', line 68

def doc_rc #document rc, make instructions
  (defined? @md.make) \
  ? @md.make
  : nil
end

#dump?Boolean

Returns:

  • (Boolean)


420
421
422
423
424
425
426
# File 'lib/sisu/se_processing.rb', line 420

def dump?
  ((cmd_rc_act[:dump][:bool] \
  &&  cmd_rc_act[:dump][:inst]) \
  || (env_rc.output_dir_structure.dump?)) \
  ? true
  : false
end

#dump_or_redirect?Boolean

Returns:

  • (Boolean)


434
435
436
437
438
# File 'lib/sisu/se_processing.rb', line 434

def dump_or_redirect?
  ((dump?) || (redirect?)) \
  ? true
  : false
end

#env_rcObject

env rc (including sisurc.yml)



65
66
67
# File 'lib/sisu/se_processing.rb', line 65

def env_rc #env rc (including sisurc.yml)
  @env_rc ||=SiSU_Env::InfoEnv.new(@md.fns)
end

#html_minitoc?Boolean

Returns:

  • (Boolean)


239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
# File 'lib/sisu/se_processing.rb', line 239

def html_minitoc?
  if html_top_band? == false #one form of navigation necessary
    true
  elsif cmd_rc_act[:html_minitoc][:set]==:on \
  || cmd_rc_act[:minitoc][:set]==:on
    true
  elsif cmd_rc_act[:html_minitoc][:set]==:off \
  || cmd_rc_act[:minitoc][:set]==:off
    false
  elsif doc_rc.is_a?(Method) \
  and defined? doc_rc.html_minitoc? \
  and (doc_rc.html_minitoc? ==:off \
  || doc_rc.minitoc? ==:off)
    false
  elsif env_rc.build.html_minitoc? ==:off \
  || env_rc.build.minitoc? ==:off
    false
  elsif minitoc? == false
    false
  else
    false
  end
end

#html_navigation?Boolean

Returns:

  • (Boolean)


277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
# File 'lib/sisu/se_processing.rb', line 277

def html_navigation?
  if cmd_rc_act[:html_navigation][:set]==:on
    true
  elsif cmd_rc_act[:html_navigation][:set]==:off
    false
  elsif doc_rc.is_a?(Method) \
  and defined? doc_rc.html_navigation? \
  and doc_rc.html_navigation? ==:off
    false
  elsif env_rc.build.html_navigation? ==:off
    false
  else
    true
  end
end

#html_navigation_bar?Boolean

Returns:

  • (Boolean)


292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
# File 'lib/sisu/se_processing.rb', line 292

def html_navigation_bar?
  if cmd_rc_act[:html_navigation_bar][:set]==:on
    true
  elsif cmd_rc_act[:html_navigation_bar][:set]==:off
    false
  elsif doc_rc.is_a?(Method) \
  and defined? doc_rc.html_navigation_bar? \
  and doc_rc.html_navigation_bar? ==:off
    false
  elsif env_rc.build.html_navigation_bar? ==:off
    false
  else
    false
  end
end

#html_right_pane?Boolean

Returns:

  • (Boolean)


343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
# File 'lib/sisu/se_processing.rb', line 343

def html_right_pane?
  if cmd_rc_act[:html_right_pane][:set]==:on
    true
  elsif cmd_rc_act[:html_right_pane][:set]==:off
    false
  elsif doc_rc.is_a?(Method) \
  and defined? doc_rc.html_right_pane? \
  and doc_rc.html_right_pane? ==:off
    false
  elsif env_rc.build.html_right_pane? ==:off
    false
  else
    true
  end
end

#html_search_form?Boolean

Returns:

  • (Boolean)


322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
# File 'lib/sisu/se_processing.rb', line 322

def html_search_form?
  if cmd_rc_act[:html_search_form][:set]==:on \
  || cmd_rc_act[:search_form][:set]==:on
    true
  elsif cmd_rc_act[:html_search_form][:set]==:off \
  || cmd_rc_act[:search_form][:set]==:off
    false
  elsif doc_rc.is_a?(Method) \
  and defined? doc_rc.html_search_form? \
  and (doc_rc.html_search_form? ==:off \
  || doc_rc.search_form? ==:off)
    false
  elsif env_rc.build.html_search_form? ==:off \
  || env_rc.build.search_form? ==:off
    false
  elsif search_form? == false
    false
  else
    true
  end
end

#html_strict?Boolean

Returns:

  • (Boolean)


126
127
128
129
130
131
132
133
134
135
136
137
138
# File 'lib/sisu/se_processing.rb', line 126

def html_strict?
  if cmd_rc_act[:html_strict][:set]==:on
    true
  elsif cmd_rc_act[:html_strict][:set]==:off
    false
  elsif doc_rc.is_a?(Method) \
  and defined? doc_rc.html_strict? \
  and doc_rc.html_strict? ==:on
    true
  else
    false
  end
end

#html_top_band?Boolean

Returns:

  • (Boolean)


262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
# File 'lib/sisu/se_processing.rb', line 262

def html_top_band?
  if cmd_rc_act[:html_top_band][:set]==:on
    true
  elsif cmd_rc_act[:html_top_band][:set]==:off
    false
  elsif doc_rc.is_a?(Method) \
  and defined? doc_rc.html_top_band? \
  and doc_rc.html_top_band? ==:off
    false
  elsif env_rc.build.html_top_band? ==:off
    false
  else
    true
  end
end

Returns:

  • (Boolean)


169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
# File 'lib/sisu/se_processing.rb', line 169

def links_to_manifest?
  if cmd_rc_act[:links_to_manifest][:set]==:on
    true
  elsif cmd_rc_act[:links_to_manifest][:set]==:off
    false
  elsif doc_rc.is_a?(Method) \
  and defined? doc_rc.links_to_manifest? \
  and doc_rc.links_to_manifest? ==:off
    false
  elsif env_rc.build.links_to_manifest? ==:off
    false
  else
    true
  end
end

#manifest?Boolean

Returns:

  • (Boolean)


154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'lib/sisu/se_processing.rb', line 154

def manifest?
  if cmd_rc_act[:manifest][:set]==:on
    true
  elsif cmd_rc_act[:manifest][:set]==:off
    false
  elsif doc_rc.is_a?(Method) \
  and defined? doc_rc.manifest? \
  and doc_rc.manifest? ==:off
    false
  elsif env_rc.build.manifest? ==:off
    false
  else
    true
  end
end

#manifest_minitoc?Boolean

Returns:

  • (Boolean)


216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
# File 'lib/sisu/se_processing.rb', line 216

def manifest_minitoc?
  if html_top_band? == false #one form of navigation necessary
    true
  elsif cmd_rc_act[:manifest_minitoc][:set]==:on \
  || cmd_rc_act[:minitoc][:set]==:on
    true
  elsif cmd_rc_act[:manifest_minitoc][:set]==:off \
  || cmd_rc_act[:minitoc][:set]==:off
    false
  elsif doc_rc.is_a?(Method) \
  and defined? doc_rc.manifest_minitoc? \
  and (doc_rc.manifest_minitoc? ==:off \
  || doc_rc.minitoc? ==:off)
    false
  elsif env_rc.build.manifest_minitoc? ==:off \
  || env_rc.build.minitoc? ==:off
    false
  elsif minitoc? == false
    false
  else
    false
  end
end

#metadata?Boolean

Returns:

  • (Boolean)


184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/sisu/se_processing.rb', line 184

def metadata?
  if cmd_rc_act[:metadata][:set]==:on
    true
  elsif cmd_rc_act[:metadata][:set]==:off
    false
  elsif doc_rc.is_a?(Method) \
  and defined? doc_rc.metadata? \
  and doc_rc.metadata? ==:off
    false
  elsif env_rc.build.metadata? ==:off
    false
  else
    true
  end
end

#minitoc?Boolean

Returns:

  • (Boolean)


199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
# File 'lib/sisu/se_processing.rb', line 199

def minitoc?
  if html_top_band? == false #one form of navigation necessary
    true
  elsif cmd_rc_act[:minitoc][:set]==:on
    true
  elsif cmd_rc_act[:minitoc][:set]==:off
    false
  elsif doc_rc.is_a?(Method) \
  and defined? doc_rc.minitoc? \
  and doc_rc.minitoc? ==:off
    false
  elsif env_rc.build.minitoc? ==:off
    false
  else
    false
  end
end

#multilingual?Boolean

Returns:

  • (Boolean)


417
418
419
# File 'lib/sisu/se_processing.rb', line 417

def multilingual?
  by_language_code?
end

#ocn?Boolean

Returns:

  • (Boolean)


77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/sisu/se_processing.rb', line 77

def ocn?
  if cmd_rc_act[:ocn][:set]==:on
    true
  elsif cmd_rc_act[:ocn][:set]==:off
    false
  elsif doc_rc.is_a?(Method) \
  and defined? doc_rc.ocn? \
  and doc_rc.toc? ==:off
    false
  elsif env_rc.build.ocn? ==:off
    false
  else
    true
  end
end

#ocn_html_identifierObject



375
376
377
378
379
# File 'lib/sisu/se_processing.rb', line 375

def ocn_html_identifier
  (build.html_strict?) \
  ? Mx[:ocn_id_char]
  : ''
end

#odt_ocn?Boolean

Returns:

  • (Boolean)


109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/sisu/se_processing.rb', line 109

def odt_ocn?
  if cmd_rc_act[:odt_ocn][:set]==:on \
  or cmd_rc_act[:ocn][:set]==:on
    true
  elsif cmd_rc_act[:odt_ocn][:set]==:off \
  or cmd_rc_act[:ocn][:set]==:off
    false
  elsif doc_rc.is_a?(Method) \
  and defined? doc_rc.ocn? \
  and doc_rc.toc? ==:off
    false
  elsif env_rc.build.ocn? ==:off
    false
  else
    true
  end
end

#output_dir_structureObject



380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
# File 'lib/sisu/se_processing.rb', line 380

def output_dir_structure
  def by_language_code?
    if cmd_rc_act[:output_by][:set] == :language
      true
    elsif cmd_rc_act[:output_by][:set] == :filetype \
    or cmd_rc_act[:output_by][:set] == :filename
      false
    elsif cmd_rc_act[:output_by][:set] == :language
      true
    else
      env_rc.output_dir_structure.by_language_code?
    end
  end
  def by_filetype?
    if cmd_rc_act[:output_by][:set] == :filetype
      true
    elsif cmd_rc_act[:output_by][:set] == :language \
    or cmd_rc_act[:output_by][:set] == :filename
      false
    elsif cmd_rc_act[:output_by][:set] == :filetype
      true
    else
      env_rc.output_dir_structure.by_filetype?
    end
  end
  def by_filename?
    if cmd_rc_act[:output_by][:set] == :filename
      true
    elsif cmd_rc_act[:output_by][:set] == :language \
    or cmd_rc_act[:output_by][:set] == :filetype
      false
    elsif cmd_rc_act[:output_by][:set] == :filename
      true
    else
      env_rc.output_dir_structure.by_filename?
    end
  end
  def multilingual?
    by_language_code?
  end
  def dump?
    ((cmd_rc_act[:dump][:bool] \
    &&  cmd_rc_act[:dump][:inst]) \
    || (env_rc.output_dir_structure.dump?)) \
    ? true
    : false
  end
  def redirect?
    ((cmd_rc_act[:redirect][:bool] \
    &&  cmd_rc_act[:redirect][:inst]) \
    || (env_rc.output_dir_structure.redirect?)) \
    ? true
    : false
  end
  def dump_or_redirect?
    ((dump?) || (redirect?)) \
    ? true
    : false
  end
  def by?
    if dump?
      :dump
    elsif redirect?
      :redirect
    elsif by_language_code?
      :language
    elsif by_filetype?
      :filetype
    elsif by_filename?
      :filename
    else #recheck current default
      :language
    end
  end
  self
end

#plaintext_ocn?Boolean

Returns:

  • (Boolean)


92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/sisu/se_processing.rb', line 92

def plaintext_ocn?
  if cmd_rc_act[:txt_ocn][:set]==:on \
  or cmd_rc_act[:ocn][:set]==:on
    true
  elsif cmd_rc_act[:txt_ocn][:set]==:off \
  or cmd_rc_act[:ocn][:set]==:off
    false
  elsif doc_rc.is_a?(Method) \
  and defined? doc_rc.ocn? \
  and doc_rc.toc? ==:off
    false
  elsif env_rc.build.ocn? ==:off
    false
  else
    true
  end
end

#redirect?Boolean

Returns:

  • (Boolean)


427
428
429
430
431
432
433
# File 'lib/sisu/se_processing.rb', line 427

def redirect?
  ((cmd_rc_act[:redirect][:bool] \
  &&  cmd_rc_act[:redirect][:inst]) \
  || (env_rc.output_dir_structure.redirect?)) \
  ? true
  : false
end

#search_form?Boolean

Returns:

  • (Boolean)


307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'lib/sisu/se_processing.rb', line 307

def search_form?
  if cmd_rc_act[:search_form][:set]==:on
    true
  elsif cmd_rc_act[:search_form][:set]==:off
    false
  elsif doc_rc.is_a?(Method) \
  and defined? doc_rc.html_search_form? \
  and doc_rc.search_form? ==:off
    false
  elsif env_rc.build.search_form? ==:off
    false
  else
    true
  end
end

#segsubtoc?Boolean

Returns:

  • (Boolean)


358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
# File 'lib/sisu/se_processing.rb', line 358

def segsubtoc?
  if cmd_rc_act[:segsubtoc][:set]==:on
    true
  elsif cmd_rc_act[:segsubtoc][:set]==:off
    false
  elsif doc_rc.is_a?(Method) \
  and defined? doc_rc.segsubtoc? \
  and doc_rc.segsubtoc? ==:off
    false
  elsif env_rc.build.segsubtoc? ==:off
    false
  else
    true
  end
end

#toc?Boolean

Returns:

  • (Boolean)


139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# File 'lib/sisu/se_processing.rb', line 139

def toc?
  if cmd_rc_act[:toc][:set]==:on
    true
  elsif cmd_rc_act[:toc][:set]==:off
    false
  elsif doc_rc.is_a?(Method) \
  and defined? doc_rc.toc? \
  and doc_rc.toc? ==:off
    false
  elsif env_rc.build.toc? ==:off
    false
  else
    true
  end
end