markdown_ruby_documentation 0.13.0 → 0.14.0

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
  SHA1:
3
- metadata.gz: 473a53d5f03184b6f4fd03121ff0c9234ff2e0ef
4
- data.tar.gz: 68055dc5da34403f9284502c8805114ff1863833
3
+ metadata.gz: 6439a7ab64309e768de3b9d4e033171b17ac7e55
4
+ data.tar.gz: ec024042c55f7c9138264bd6a2ff88d2f91e6b1f
5
5
  SHA512:
6
- metadata.gz: eaf7ffa30459a699a9217e0be2277dec446265dc6a20ba177f7715f8ece4f5b6491cda7ed5959b633da079fc1180411f60e7994b100fd0174ff1aeecc9464833
7
- data.tar.gz: c98fefe346906e267609a5c2188fc5fd1be500d0835734911bcca6f4232efd24022d31aec2447414295fd45b4943255e572915fb6eade4ff037d74cf2631d5ed
6
+ metadata.gz: ba2200713d55eeafb7f3e9c9744672ec0d28d6f27fab662434b91f0566b00d873c3c0d071cc4b5055aec29b6c6f32ce3be33ed97e7f043c5117f687b7632dc6b
7
+ data.tar.gz: bc336cfcc5095f95f6b29b877b6f5962c42348e41801a34c373a4caf53897d04d4e44b37d17670160526163837e890fbbe140125b93349618a81a99b0ed3e5c8
data/README.md CHANGED
@@ -118,6 +118,7 @@ Converts case statements and if statements to bulleted markdown
118
118
  * remove_end_keyword, options: proc(replacement, match)
119
119
  * constants_with_name_and_value, options: proc(replacement, match, opt={})
120
120
  * remove_memoized_vars, options: proc(replacement, match)
121
+ * rescue_format, options: proc(replacement, match)
121
122
 
122
123
 
123
124
  #### `format_link`
@@ -130,7 +130,8 @@ module MarkdownRubyDocumentation
130
130
  :remove_end_keyword,
131
131
  :constants_with_name_and_value,
132
132
  :remove_memoized_vars,
133
- :comment_format
133
+ :comment_format,
134
+ :rescue_format
134
135
  ]
135
136
 
136
137
  def ruby_to_markdown(*args)
@@ -153,6 +154,13 @@ module MarkdownRubyDocumentation
153
154
  ruby_source
154
155
  end
155
156
 
157
+ def rescue_format(source_code=print_method_source, proc: false)
158
+ gsub_replacement(source_code, {
159
+ /=>\s.*/ => "",
160
+ /rescue ([a-zA-Z0-9::]*)./ => "Given a failure of \\1 __Then__\n",
161
+ }, proc: proc)
162
+ end
163
+
156
164
  def comment_format(source_code=print_method_source, proc: false)
157
165
  gsub_replacement(source_code, { /^#(.*)/ => "</br>*(\\1)*</br>" }, proc: proc)
158
166
  end
@@ -1,3 +1,3 @@
1
1
  module MarkdownRubyDocumentation
2
- VERSION = "0.13.0"
2
+ VERSION = "0.14.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markdown_ruby_documentation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dustin Zeisler
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-18 00:00:00.000000000 Z
11
+ date: 2016-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: method_source