term_utils 0.3.2 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -2
  3. data/COPYING +3 -3
  4. data/README.md +51 -16
  5. data/Rakefile +6 -0
  6. data/doc/TermUtils/AP/Article.html +57 -55
  7. data/doc/TermUtils/AP/ArticleResult.html +584 -0
  8. data/doc/TermUtils/AP/Flag.html +295 -78
  9. data/doc/TermUtils/AP/Parameter.html +891 -103
  10. data/doc/TermUtils/AP/ParameterResult.html +980 -0
  11. data/doc/TermUtils/{FF/Cursor/Context.html → AP/ParameterWalkerHooks.html} +60 -60
  12. data/doc/TermUtils/AP/ParseError.html +651 -19
  13. data/doc/TermUtils/AP/Parser.html +181 -121
  14. data/doc/TermUtils/AP/Result.html +201 -528
  15. data/doc/TermUtils/AP/Syntax.html +103 -393
  16. data/doc/TermUtils/AP/SyntaxError.html +9 -91
  17. data/doc/TermUtils/AP/Walker.html +686 -0
  18. data/doc/TermUtils/AP.html +49 -160
  19. data/doc/TermUtils/FF/Config.html +203 -35
  20. data/doc/TermUtils/FF/Context.html +585 -0
  21. data/doc/TermUtils/FF/Entry.html +626 -0
  22. data/doc/TermUtils/FF/Finder.html +850 -0
  23. data/doc/TermUtils/FF/{Cursor.html → FinderEntry.html} +473 -211
  24. data/doc/TermUtils/FF/FinderQuery.html +946 -0
  25. data/doc/TermUtils/FF/Query.html +402 -70
  26. data/doc/TermUtils/FF.html +135 -11
  27. data/doc/TermUtils/PropertyTreeNode.html +304 -190
  28. data/doc/TermUtils/Tab/Column.html +98 -96
  29. data/doc/TermUtils/Tab/Header.html +30 -30
  30. data/doc/TermUtils/Tab/Holder.html +81 -81
  31. data/doc/TermUtils/Tab/Printer.html +43 -43
  32. data/doc/TermUtils/Tab/Table.html +124 -128
  33. data/doc/TermUtils/Tab/TableError.html +7 -89
  34. data/doc/TermUtils/Tab.html +93 -86
  35. data/doc/TermUtils.html +10 -10
  36. data/doc/_index.html +62 -42
  37. data/doc/class_list.html +3 -3
  38. data/doc/css/style.css +3 -2
  39. data/doc/file.README.html +63 -26
  40. data/doc/file_list.html +2 -2
  41. data/doc/frames.html +2 -2
  42. data/doc/index.html +63 -26
  43. data/doc/js/app.js +14 -3
  44. data/doc/method_list.html +708 -236
  45. data/doc/top-level-namespace.html +7 -7
  46. data/lib/term_utils/ap/article.rb +15 -9
  47. data/lib/term_utils/ap/flag.rb +37 -20
  48. data/lib/term_utils/ap/parameter.rb +88 -19
  49. data/lib/term_utils/ap/parser.rb +143 -116
  50. data/lib/term_utils/ap/result.rb +208 -161
  51. data/lib/term_utils/ap/syntax.rb +53 -69
  52. data/lib/term_utils/ap.rb +79 -24
  53. data/lib/term_utils/ff/config.rb +22 -10
  54. data/lib/term_utils/{ap/no_such_value_error.rb → ff/entry.rb} +26 -8
  55. data/lib/term_utils/ff/finder.rb +255 -0
  56. data/lib/term_utils/ff/query.rb +94 -17
  57. data/lib/term_utils/ff.rb +12 -2
  58. data/lib/term_utils/property_tree_node.rb +47 -19
  59. data/lib/term_utils/tab.rb +106 -61
  60. data/lib/term_utils.rb +8 -1
  61. data/term_utils.gemspec +4 -4
  62. metadata +18 -17
  63. data/doc/TermUtils/AP/Element.html +0 -1025
  64. data/doc/TermUtils/AP/Level.html +0 -638
  65. data/doc/TermUtils/AP/NoSuchValueError.html +0 -217
  66. data/lib/term_utils/ap/element.rb +0 -78
  67. data/lib/term_utils/ap/level.rb +0 -57
  68. data/lib/term_utils/ap/parse_error.rb +0 -27
  69. data/lib/term_utils/ap/syntax_error.rb +0 -27
  70. data/lib/term_utils/ff/cursor.rb +0 -153
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 61a23886775e6b866957706d701cb81b569fc58d300a289890b0ad7d79b3af19
4
- data.tar.gz: caf67bce45fcbd208a37a3ca30cd3219106b42d70a36bfb595fcd1cfb54d64f7
3
+ metadata.gz: 9d525b01701659abb4065871601ce14359c34a6654be849d410fb5b10d1b8255
4
+ data.tar.gz: 040f2fec5ea931f3f07a6288ccea45b55b23908d54b9a84636f34f8720551cb2
5
5
  SHA512:
6
- metadata.gz: daa5f35af6e76d7323356e8ef97d7a58c6170dc74d2bbbb75103100a9425a2c6994d4cc4dfa7f98f4fac27220fed27bd7b845b75e38e354185452e779658cda5
7
- data.tar.gz: 90e189718ac80957233eeb5e57090b88bda706932b4e18b6790ac6ee123ec05f4292e495f84bc8928492f62c2bb22c5903d6a68804022a4fedaa90c100363702
6
+ metadata.gz: e6a68c34584eb3b627ed72a919b5bed76427946aae0f3e03301ca94d11169565e35ce35c23b5ddfba8d472e85d002210059c8d65c64a6bdb6f320adcd962b6d0
7
+ data.tar.gz: 91569f0a29c3312eb7d53e23cb300cb815df0d2f1ac59c2d64fc561a6a1dbe90ee97ff199ec455b5f7eefe5db3db1700f5453702f3b791e5cb6464c10fdcd5c1
data/CHANGELOG.md CHANGED
@@ -1,4 +1,18 @@
1
- # Changelog for term_utils
1
+ # term_utils - Changelog
2
+
3
+ ### 0.5.0 - 2023-08-09
4
+
5
+ ### Added
6
+
7
+ - Added AP::ParseError properties: parameter and fault.
8
+ - Added FF.find.
9
+
10
+ ### 0.4.0 - 2020-08-02
11
+
12
+ ### Changed
13
+
14
+ - Changed AP API.
15
+ - Changed FF API.
2
16
 
3
17
  ## 0.3.2 - 2020-02-07
4
18
 
@@ -41,4 +55,4 @@
41
55
 
42
56
  ### Added
43
57
 
44
- - Initial base code. No documentation whatsoever. Sorry about that.
58
+ - Initial base code.
data/COPYING CHANGED
@@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively
631
631
  state the exclusion of warranty; and each file should have at least
632
632
  the "copyright" line and a pointer to where the full notice is found.
633
633
 
634
- term_utils
635
- Copyright (C) 2019 Thomas Baron
634
+ term_utils provides utilities for terminal application.
635
+ Copyright (C) 2021 Thomas Baron
636
636
 
637
637
  This program is free software: you can redistribute it and/or modify
638
638
  it under the terms of the GNU General Public License as published by
@@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
652
652
  If the program does terminal interaction, make it output a short
653
653
  notice like this when it starts in an interactive mode:
654
654
 
655
- term_utils Copyright (C) 2019 Thomas Baron
655
+ term_utils Copyright (C) 2020 Thomas Baron
656
656
  This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657
657
  This is free software, and you are welcome to redistribute it
658
658
  under certain conditions; type `show c' for details.
data/README.md CHANGED
@@ -1,24 +1,63 @@
1
1
  # term_utils
2
2
 
3
- Terminal utilities for ruby.
4
-
5
3
  ## Purpose
6
4
 
7
- Provides terminal utilities like table formatting.
5
+ Provides utilities like argument parsing, table formatting and file finding.
6
+
7
+ ## Getting Started
8
+
9
+ Install term_utils at the command prompt:
10
+
11
+ gem install term_utils
12
+
13
+ Require term_utils in the source file:
14
+
15
+ require 'term_utils'
8
16
 
9
17
  ## Content
10
18
 
11
- ### Table formatting
19
+ ### Argument Parsing
20
+
21
+ Exmaple:
22
+
23
+ require 'term_utils/ap'
24
+ syntax = TermUtils::AP.create_syntax do |s|
25
+ s.define_parameter :limit do |p|
26
+ p.define_flag '-l'
27
+ p.define_article
28
+ end
29
+ s.define_parameter :path do |p|
30
+ p.max_occurs = nil
31
+ p.define_article
32
+ end
33
+ end
34
+ limit = nil
35
+ paths = []
36
+ TermUtils::AP.parse_arguments(syntax, ARGV) do |on|
37
+ on.parameter :limit do |p|
38
+ limit = p.value
39
+ end
40
+ on.parameter :path do |p|
41
+ paths << p.value
42
+ end
43
+ end
44
+ puts "limit: #{limit}"
45
+ puts "paths:"
46
+ paths.each { |p| puts " #{p}" }
47
+
48
+ See the [manual](manual/ARGUMENT_PARSING.md) for more details.
49
+
50
+ ### Table Formatting
12
51
 
13
52
  Take the following table:
14
53
 
15
- id string8 string16
54
+ id string8 string16
16
55
  ---- -------- ----------------
17
- 1 Fiat Lux Fiat Lux
18
- 2 Alea ... Alea jacta est
56
+ 1 Fiat Lux Fiat Lux
57
+ 2 Alea ... Alea jacta est
19
58
  3 Audac... Audaces fortuna juvat
20
59
  ---- -------- ----------------
21
- id string8 string16
60
+ id string8 string16
22
61
 
23
62
  You can produce it with the following code:
24
63
 
@@ -47,17 +86,13 @@ You can produce it with the following code:
47
86
  tpr.line
48
87
  end
49
88
 
50
- ### Argument Parsing
51
-
52
- The Argument Parsing module provides a way to parse command line arguments.
53
-
54
- See Samples.
89
+ ### File Finding
55
90
 
56
- ### File Finder
91
+ The File Finding module provides a way to query the filesystem.
57
92
 
58
- The File Finder module provides a way to query the filesystem.
93
+ ## Version History
59
94
 
60
- See the samples.
95
+ [CHANGELOG](CHANGELOG.md)
61
96
 
62
97
  ## License
63
98
 
data/Rakefile CHANGED
@@ -10,6 +10,7 @@ GEM = "#{GEM_NAME}-#{GEM_VERSION}.gem"
10
10
 
11
11
  task :default => :help
12
12
 
13
+ desc "Print help."
13
14
  task :help do
14
15
  puts <<-EOS
15
16
  usage: rake <target>...
@@ -29,8 +30,10 @@ To deploy a gem:
29
30
  EOS
30
31
  end
31
32
 
33
+ desc "Create gem."
32
34
  task :gem => GEM
33
35
 
36
+ desc "Generate documentation."
34
37
  task :doc => %w[.doc]
35
38
 
36
39
  file ".doc" do
@@ -42,14 +45,17 @@ file GEM => %w[.doc] do
42
45
  sh "gem build #{GEM_NAME}"
43
46
  end
44
47
 
48
+ desc "Install gem."
45
49
  task :install => :gem do
46
50
  sh "gem install #{GEM}"
47
51
  end
48
52
 
53
+ desc "Uninstall gem."
49
54
  task :uninstall do
50
55
  sh "gem uninstall #{GEM_NAME} --version #{GEM_VERSION}"
51
56
  end
52
57
 
58
+ desc "Remove documentation and gem."
53
59
  task :clean do
54
60
  sh "rm -rf .doc doc #{GEM}"
55
61
  end
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  Class: TermUtils::AP::Article
8
8
 
9
- &mdash; Documentation by YARD 0.9.20
9
+ &mdash; Documentation by YARD 0.9.34
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "TermUtils::AP::Article";
19
19
  relpath = '../../';
20
20
  </script>
@@ -138,7 +138,7 @@
138
138
 
139
139
 
140
140
  <span class="summary_desc"><div class='inline'>
141
- <p>`%d`, `%s`.</p>
141
+ <p>‘%d`, `%s`.</p>
142
142
  </div></span>
143
143
 
144
144
  </li>
@@ -240,7 +240,7 @@
240
240
 
241
241
 
242
242
  <span class="summary_desc"><div class='inline'>
243
- <p>`:integer`, `:string`.</p>
243
+ <p>‘:integer`, `:string`.</p>
244
244
  </div></span>
245
245
 
246
246
  </li>
@@ -351,7 +351,7 @@
351
351
 
352
352
 
353
353
  <span class="summary_desc"><div class='inline'>
354
- <p>Tests whether the number of occurs are fixed.</p>
354
+ <p>Tests whether the number of occurs is fixed.</p>
355
355
  </div></span>
356
356
 
357
357
  </li>
@@ -422,7 +422,7 @@
422
422
  </span>
423
423
 
424
424
  &mdash; <div class='inline'>
425
- <p>Default value is `1`.</p>
425
+ <p>Default value is 1`.</p>
426
426
  </div>
427
427
 
428
428
  </li>
@@ -435,7 +435,7 @@
435
435
  </span>
436
436
 
437
437
  &mdash; <div class='inline'>
438
- <p>Default value is `1`.</p>
438
+ <p>Default value is 1`.</p>
439
439
  </div>
440
440
 
441
441
  </li>
@@ -448,7 +448,7 @@
448
448
  </span>
449
449
 
450
450
  &mdash; <div class='inline'>
451
- <p>`:integer`, `:string`.</p>
451
+ <p>‘:integer`, `:string`.</p>
452
452
  </div>
453
453
 
454
454
  </li>
@@ -472,23 +472,23 @@
472
472
  <pre class="lines">
473
473
 
474
474
 
475
- 39
476
- 40
477
475
  41
478
476
  42
479
477
  43
480
478
  44
481
- 45</pre>
479
+ 45
480
+ 46
481
+ 47</pre>
482
482
  </td>
483
483
  <td>
484
- <pre class="code"><span class="info file"># File 'lib/term_utils/ap/article.rb', line 39</span>
484
+ <pre class="code"><span class="info file"># File 'lib/term_utils/ap/article.rb', line 41</span>
485
485
 
486
486
  <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
487
487
  <span class='ivar'>@id</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:id</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span>
488
488
  <span class='ivar'>@min_occurs</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:min_occurs</span><span class='comma'>,</span> <span class='int'>1</span><span class='rparen'>)</span>
489
489
  <span class='ivar'>@max_occurs</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:max_occurs</span><span class='comma'>,</span> <span class='int'>1</span><span class='rparen'>)</span>
490
490
  <span class='ivar'>@type</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:type</span><span class='comma'>,</span> <span class='symbol'>:string</span><span class='rparen'>)</span>
491
- <span class='ivar'>@format</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:format</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%s</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
491
+ <span class='ivar'>@format</span> <span class='op'>=</span> <span class='id identifier rubyid_opts'>opts</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:format</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>%s</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
492
492
  <span class='kw'>end</span></pre>
493
493
  </td>
494
494
  </tr>
@@ -514,7 +514,7 @@
514
514
  </h3><div class="docstring">
515
515
  <div class="discussion">
516
516
 
517
- <p>Returns `%d`, `%s`.</p>
517
+ <p>Returns ‘%d`, `%s`.</p>
518
518
 
519
519
 
520
520
  </div>
@@ -533,7 +533,7 @@
533
533
 
534
534
  &mdash;
535
535
  <div class='inline'>
536
- <p>`%d`, `%s`.</p>
536
+ <p>‘%d`, `%s`.</p>
537
537
  </div>
538
538
 
539
539
  </li>
@@ -546,12 +546,12 @@
546
546
  <pre class="lines">
547
547
 
548
548
 
549
- 31
550
549
  32
551
- 33</pre>
550
+ 33
551
+ 34</pre>
552
552
  </td>
553
553
  <td>
554
- <pre class="code"><span class="info file"># File 'lib/term_utils/ap/article.rb', line 31</span>
554
+ <pre class="code"><span class="info file"># File 'lib/term_utils/ap/article.rb', line 32</span>
555
555
 
556
556
  <span class='kw'>def</span> <span class='id identifier rubyid_format'>format</span>
557
557
  <span class='ivar'>@format</span>
@@ -600,12 +600,12 @@
600
600
  <pre class="lines">
601
601
 
602
602
 
603
- 23
604
603
  24
605
- 25</pre>
604
+ 25
605
+ 26</pre>
606
606
  </td>
607
607
  <td>
608
- <pre class="code"><span class="info file"># File 'lib/term_utils/ap/article.rb', line 23</span>
608
+ <pre class="code"><span class="info file"># File 'lib/term_utils/ap/article.rb', line 24</span>
609
609
 
610
610
  <span class='kw'>def</span> <span class='id identifier rubyid_id'>id</span>
611
611
  <span class='ivar'>@id</span>
@@ -654,12 +654,12 @@
654
654
  <pre class="lines">
655
655
 
656
656
 
657
- 27
658
657
  28
659
- 29</pre>
658
+ 29
659
+ 30</pre>
660
660
  </td>
661
661
  <td>
662
- <pre class="code"><span class="info file"># File 'lib/term_utils/ap/article.rb', line 27</span>
662
+ <pre class="code"><span class="info file"># File 'lib/term_utils/ap/article.rb', line 28</span>
663
663
 
664
664
  <span class='kw'>def</span> <span class='id identifier rubyid_max_occurs'>max_occurs</span>
665
665
  <span class='ivar'>@max_occurs</span>
@@ -708,12 +708,12 @@
708
708
  <pre class="lines">
709
709
 
710
710
 
711
- 25
712
711
  26
713
- 27</pre>
712
+ 27
713
+ 28</pre>
714
714
  </td>
715
715
  <td>
716
- <pre class="code"><span class="info file"># File 'lib/term_utils/ap/article.rb', line 25</span>
716
+ <pre class="code"><span class="info file"># File 'lib/term_utils/ap/article.rb', line 26</span>
717
717
 
718
718
  <span class='kw'>def</span> <span class='id identifier rubyid_min_occurs'>min_occurs</span>
719
719
  <span class='ivar'>@min_occurs</span>
@@ -737,7 +737,7 @@
737
737
  </h3><div class="docstring">
738
738
  <div class="discussion">
739
739
 
740
- <p>Returns `:integer`, `:string`</p>
740
+ <p>Returns ‘:integer`, `:string`.</p>
741
741
 
742
742
 
743
743
  </div>
@@ -756,7 +756,7 @@
756
756
 
757
757
  &mdash;
758
758
  <div class='inline'>
759
- <p>`:integer`, `:string`</p>
759
+ <p>‘:integer`, `:string`</p>
760
760
  </div>
761
761
 
762
762
  </li>
@@ -769,12 +769,12 @@
769
769
  <pre class="lines">
770
770
 
771
771
 
772
- 29
773
772
  30
774
- 31</pre>
773
+ 31
774
+ 32</pre>
775
775
  </td>
776
776
  <td>
777
- <pre class="code"><span class="info file"># File 'lib/term_utils/ap/article.rb', line 29</span>
777
+ <pre class="code"><span class="info file"># File 'lib/term_utils/ap/article.rb', line 30</span>
778
778
 
779
779
  <span class='kw'>def</span> <span class='id identifier rubyid_type'>type</span>
780
780
  <span class='ivar'>@type</span>
@@ -843,21 +843,23 @@
843
843
  <pre class="lines">
844
844
 
845
845
 
846
- 48
847
- 49
848
- 50
849
846
  51
850
847
  52
851
848
  53
852
849
  54
853
- 55</pre>
850
+ 55
851
+ 56
852
+ 57
853
+ 58
854
+ 59</pre>
854
855
  </td>
855
856
  <td>
856
- <pre class="code"><span class="info file"># File 'lib/term_utils/ap/article.rb', line 48</span>
857
+ <pre class="code"><span class="info file"># File 'lib/term_utils/ap/article.rb', line 51</span>
857
858
 
858
859
  <span class='kw'>def</span> <span class='id identifier rubyid_finalize!'>finalize!</span><span class='lparen'>(</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
859
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="../../TermUtils.html" title="TermUtils (module)">TermUtils</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../AP.html" title="TermUtils::AP (module)">AP</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="SyntaxError.html" title="TermUtils::AP::SyntaxError (class)">SyntaxError</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>min_occurs must be equal or greater than 0</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>unless</span> <span class='lparen'>(</span><span class='ivar'>@min_occurs</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Integer</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='lparen'>(</span><span class='ivar'>@min_occurs</span> <span class='op'>&gt;=</span> <span class='int'>0</span><span class='rparen'>)</span>
860
- <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="../../TermUtils.html" title="TermUtils (module)">TermUtils</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../AP.html" title="TermUtils::AP (module)">AP</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="SyntaxError.html" title="TermUtils::AP::SyntaxError (class)">SyntaxError</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>max_occurs must be equal or greater than min_occurs</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>unless</span> <span class='op'>!</span><span class='id identifier rubyid_occur_bounded?'>occur_bounded?</span> <span class='op'>||</span> <span class='lparen'>(</span><span class='ivar'>@max_occurs</span> <span class='op'>&gt;=</span> <span class='ivar'>@min_occurs</span><span class='rparen'>)</span>
860
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="../../TermUtils.html" title="TermUtils (module)">TermUtils</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../AP.html" title="TermUtils::AP (module)">AP</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="SyntaxError.html" title="TermUtils::AP::SyntaxError (class)">SyntaxError</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>min_occurs must be equal or greater than 0</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>if</span> <span class='op'>!</span><span class='ivar'>@min_occurs</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Integer</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='lparen'>(</span><span class='ivar'>@min_occurs</span> <span class='op'>&lt;</span> <span class='int'>0</span><span class='rparen'>)</span>
861
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="../../TermUtils.html" title="TermUtils (module)">TermUtils</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../AP.html" title="TermUtils::AP (module)">AP</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="SyntaxError.html" title="TermUtils::AP::SyntaxError (class)">SyntaxError</a></span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>max_occurs must be equal or greater than min_occurs</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_occur_bounded?'>occur_bounded?</span> <span class='op'>&amp;&amp;</span> <span class='lparen'>(</span><span class='ivar'>@max_occurs</span> <span class='op'>&lt;</span> <span class='ivar'>@min_occurs</span><span class='rparen'>)</span>
862
+
861
863
  <span class='kw'>unless</span> <span class='ivar'>@id</span>
862
864
  <span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:anonymous</span><span class='rbracket'>]</span> <span class='op'>+=</span> <span class='int'>1</span>
863
865
  <span class='ivar'>@id</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>anonymous</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_opts'>opts</span><span class='lbracket'>[</span><span class='symbol'>:anonymous</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='period'>.</span><span class='id identifier rubyid_intern'>intern</span>
@@ -907,15 +909,15 @@
907
909
  <pre class="lines">
908
910
 
909
911
 
910
- 58
911
- 59
912
- 60</pre>
912
+ 63
913
+ 64
914
+ 65</pre>
913
915
  </td>
914
916
  <td>
915
- <pre class="code"><span class="info file"># File 'lib/term_utils/ap/article.rb', line 58</span>
917
+ <pre class="code"><span class="info file"># File 'lib/term_utils/ap/article.rb', line 63</span>
916
918
 
917
919
  <span class='kw'>def</span> <span class='id identifier rubyid_multiple_occurs?'>multiple_occurs?</span>
918
- <span class='lparen'>(</span><span class='ivar'>@max_occurs</span> <span class='op'>==</span> <span class='kw'>nil</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='lparen'>(</span><span class='ivar'>@max_occurs</span> <span class='op'>==</span> <span class='symbol'>:infinity</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='lparen'>(</span><span class='lparen'>(</span><span class='ivar'>@max_occurs</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Integer</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='lparen'>(</span><span class='ivar'>@max_occurs</span> <span class='op'>&gt;</span> <span class='int'>1</span><span class='rparen'>)</span><span class='rparen'>)</span>
920
+ <span class='lparen'>(</span><span class='ivar'>@max_occurs</span> <span class='op'>==</span> <span class='kw'>nil</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='lparen'>(</span><span class='ivar'>@max_occurs</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Integer</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='lparen'>(</span><span class='ivar'>@max_occurs</span> <span class='op'>&gt;</span> <span class='int'>1</span><span class='rparen'>)</span><span class='rparen'>)</span>
919
921
  <span class='kw'>end</span></pre>
920
922
  </td>
921
923
  </tr>
@@ -934,7 +936,7 @@
934
936
  </h3><div class="docstring">
935
937
  <div class="discussion">
936
938
 
937
- <p>Tests whether the number of occurs are fixed.</p>
939
+ <p>Tests whether the number of occurs is fixed.</p>
938
940
 
939
941
 
940
942
  </div>
@@ -961,15 +963,15 @@
961
963
  <pre class="lines">
962
964
 
963
965
 
964
- 63
965
- 64
966
- 65</pre>
966
+ 69
967
+ 70
968
+ 71</pre>
967
969
  </td>
968
970
  <td>
969
- <pre class="code"><span class="info file"># File 'lib/term_utils/ap/article.rb', line 63</span>
971
+ <pre class="code"><span class="info file"># File 'lib/term_utils/ap/article.rb', line 69</span>
970
972
 
971
973
  <span class='kw'>def</span> <span class='id identifier rubyid_occur_bounded?'>occur_bounded?</span>
972
- <span class='lparen'>(</span><span class='ivar'>@max_occurs</span> <span class='op'>!=</span> <span class='kw'>nil</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='lparen'>(</span><span class='ivar'>@max_occurs</span> <span class='op'>!=</span> <span class='symbol'>:infinity</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='lparen'>(</span><span class='ivar'>@max_occurs</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Integer</span><span class='rparen'>)</span>
974
+ <span class='lparen'>(</span><span class='ivar'>@max_occurs</span> <span class='op'>!=</span> <span class='kw'>nil</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='ivar'>@max_occurs</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Integer</span><span class='rparen'>)</span>
973
975
  <span class='kw'>end</span></pre>
974
976
  </td>
975
977
  </tr>
@@ -981,9 +983,9 @@
981
983
  </div>
982
984
 
983
985
  <div id="footer">
984
- Generated on Fri Feb 7 18:54:41 2020 by
985
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
986
- 0.9.20 (ruby-2.6.5).
986
+ Generated on Wed Aug 9 17:34:27 2023 by
987
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
988
+ 0.9.34 (ruby-3.2.2).
987
989
  </div>
988
990
 
989
991
  </div>