docscribe 1.2.0 → 1.2.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 88fa96ef81689e131461ed06e9f7f4cebff1ac0567416a6417d83418ba2eab3c
|
|
4
|
+
data.tar.gz: 827dcd841b63dff86681dbd65adcf1cef54089b3dabd121641eb4560052def03
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8b4f1c36ae73417133f7f3119df2989b6ea6f6273a188d344887035a9e0c68716896e3d6c179fbf8fd314494940c1f7b8179cbd974a67566922241ed8f7c274f
|
|
7
|
+
data.tar.gz: 2aa52b164aa86bed76df64af126019f08ad3ef755c044127eca9d022bceed1da1211fc26a772097c4da6d691624a561c850164420026073c1df0e04114a52d99
|
|
@@ -122,5 +122,21 @@ module Docscribe
|
|
|
122
122
|
def param_documentation
|
|
123
123
|
raw.dig('doc', 'param_documentation') || DEFAULT.dig('doc', 'param_documentation')
|
|
124
124
|
end
|
|
125
|
+
|
|
126
|
+
# Whether to include the default placeholder line:
|
|
127
|
+
# # Method documentation.
|
|
128
|
+
#
|
|
129
|
+
# @return [Boolean]
|
|
130
|
+
def include_default_message?
|
|
131
|
+
fetch_bool(%w[emit include_default_message], true)
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Whether to append placeholder text to generated @param tags:
|
|
135
|
+
# # @param [String] name Param documentation.
|
|
136
|
+
#
|
|
137
|
+
# @return [Boolean]
|
|
138
|
+
def include_param_documentation?
|
|
139
|
+
fetch_bool(%w[emit include_param_documentation], true)
|
|
140
|
+
end
|
|
125
141
|
end
|
|
126
142
|
end
|
|
@@ -28,7 +28,15 @@ module Docscribe
|
|
|
28
28
|
# Emit the header line:
|
|
29
29
|
#
|
|
30
30
|
# +MyClass#my_method+ -> ReturnType
|
|
31
|
-
header:
|
|
31
|
+
header: false
|
|
32
|
+
|
|
33
|
+
# Whether to include the default placeholder line:
|
|
34
|
+
# # Method documentation.
|
|
35
|
+
include_default_message: true
|
|
36
|
+
|
|
37
|
+
# Whether to append placeholder text to generated @param tags:
|
|
38
|
+
# # @param [String] name Param documentation.
|
|
39
|
+
include_param_documentation: true
|
|
32
40
|
|
|
33
41
|
# Emit @param tags.
|
|
34
42
|
param_tags: true
|
|
@@ -68,8 +68,10 @@ module Docscribe
|
|
|
68
68
|
lines << "#{indent}#"
|
|
69
69
|
end
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
if config.include_default_message?
|
|
72
|
+
lines << "#{indent}# #{config.default_message(scope, visibility)}"
|
|
73
|
+
lines << "#{indent}#"
|
|
74
|
+
end
|
|
73
75
|
|
|
74
76
|
if config.emit_visibility_tags?
|
|
75
77
|
case visibility
|
|
@@ -380,7 +382,7 @@ module Docscribe
|
|
|
380
382
|
fallback_type = config.fallback_type
|
|
381
383
|
treat_options_keyword_as_hash = config.treat_options_keyword_as_hash?
|
|
382
384
|
param_tag_style = config.param_tag_style
|
|
383
|
-
param_documentation = config.param_documentation
|
|
385
|
+
param_documentation = config.include_param_documentation? ? config.param_documentation : ''
|
|
384
386
|
|
|
385
387
|
args =
|
|
386
388
|
case node.type
|
data/lib/docscribe/version.rb
CHANGED