docme 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/docme.rb +8 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d8d19dbeb44f038ffe5277380befdda4b40ee8f
|
4
|
+
data.tar.gz: debbc994f2babd5d5a07a33c23964b68d8ebb27f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|