docme 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/docme.rb +8 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 09a5b6fd5fd9781268bc673895ca0782893e05db
4
- data.tar.gz: 0741976b799c2d6ee3eabe81884d54b48bdbee4f
3
+ metadata.gz: 2d8d19dbeb44f038ffe5277380befdda4b40ee8f
4
+ data.tar.gz: debbc994f2babd5d5a07a33c23964b68d8ebb27f
5
5
  SHA512:
6
- metadata.gz: 9de4cccc8755ac221de6c7901518a20fffff998879049accb1ce4a06be3755d1786796cb7f40822e233acc05a0a23c1f3a01c41ee0ee2366ed98cb2815ab5075
7
- data.tar.gz: 9c11b04a5e3d8f979f2174e55153f51568c0aefbcb4e74ff792581605b327b8a4fd46230790bb053603f8f1e315c101b1d5e23a8ba5e2048039358e33edeb35b
6
+ metadata.gz: 2f80fa7f04eb3fbb7269679c54985ee7f285465a87788a0a242e64dab5582c7a3880269dfaa88ccc22e797a11f4c70337cad08d290305f9bb5a343f468a07460
7
+ data.tar.gz: 8a67563095923b92c36c4d333094bc9cd6038b552451a738942d3244bdf4285a57e3147c5ba391810f35da8789d9466df6cdc83bad4368742defb13fe6b64308
data/lib/docme.rb CHANGED
@@ -23,6 +23,7 @@ class Docme
23
23
  block_attr = nil
24
24
  block_flag = 0
25
25
  multi_line = ""
26
+ isDocme = 0
26
27
 
27
28
 
28
29
  #PARSING
@@ -37,15 +38,18 @@ class Docme
37
38
  end
38
39
 
39
40
  #if this is the end of a comment block then there is nothing to do
40
- if stripLine.rindex("*/", 1) == 0
41
+ if stripLine.rindex("*/", 1) == 0 && isDocme == 1
41
42
  #end the function section of the erb file
42
43
  collective.push(items)
44
+ isDocme = 0
43
45
  items = Hash.new
44
46
  next
45
47
  end
46
48
 
47
49
  #if line begins with '+' then we are defining an attribute
48
50
  if stripLine.rindex("+",0) == 0
51
+
52
+ isDocme = 1
49
53
  parts = stripLine.split(":")
50
54
 
51
55
  #parts[0] == the attribute name
@@ -69,7 +73,7 @@ class Docme
69
73
  end
70
74
 
71
75
  #if line begins with a '-' then we are in a block, if we are in a block but there are no sub attributes then do a multi-line
72
- if stripLine.rindex("-",0) == 0
76
+ if stripLine.rindex("-",0) == 0 && isDocme == 1
73
77
  parts = stripLine.split(":")
74
78
 
75
79
  #parts[0] == the attribute name
@@ -85,14 +89,14 @@ class Docme
85
89
  next
86
90
  end
87
91
 
88
- if block_flag == 1 && stripLine.rindex("}}",0) != 0
92
+ if block_flag == 1 && stripLine.rindex("}}",0) != 0 && isDocme == 1
89
93
  line = cleanCode(line)
90
94
  multi_line.concat(line)
91
95
  next
92
96
  end
93
97
 
94
98
  #if the block flag is set and we reach the end of a block, then we reached the end of a regular block, unset flag
95
- if block_flag == 1 && stripLine.rindex("}}",0) == 0
99
+ if block_flag == 1 && stripLine.rindex("}}",0) == 0 && isDocme ==1
96
100
  block_flag = 0
97
101
 
98
102
  if multi_line.length > 0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docme
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bailey Belvis