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: 47833e8613a499efc8e38e215b1a85dfdc4bfe9f853f13c2b51e71bec255e51f
4
- data.tar.gz: 9154de314f1ebd9f9ef947cbe5768f398b27495ab5c904673f9da3d3e9a5b9f1
3
+ metadata.gz: 88fa96ef81689e131461ed06e9f7f4cebff1ac0567416a6417d83418ba2eab3c
4
+ data.tar.gz: 827dcd841b63dff86681dbd65adcf1cef54089b3dabd121641eb4560052def03
5
5
  SHA512:
6
- metadata.gz: 7a125e8e5ce3ee31c74fbc52352113f63016358b6d6e8c4a44708b99528f5b37715a202bd24acde17dcf9547321bd2910c3f2e640255ed62bf530a128d08e95e
7
- data.tar.gz: 762186336ec1febf4bb03965d1730c353048a2349e4fd18c654ec338cf6b08d058132a9a82708b90216d46458ca8836e6620fd98a7941897c74f9bf93f246d41
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: true
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
- lines << "#{indent}# #{config.default_message(scope, visibility)}"
72
- lines << "#{indent}#"
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Docscribe
4
- VERSION = '1.2.0'
4
+ VERSION = '1.2.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docscribe
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - unurgunite