markdown_ruby_documentation 0.11.0 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb222c7ee603c946c0da5a7ea8e542aacbec796d
4
- data.tar.gz: 83eb98d15f1d32471465b0e35ffd1b707998a065
3
+ metadata.gz: a09494db3392aaca6d279d31c3023d6ffd20c508
4
+ data.tar.gz: 4e8b9fba4a5b9cdc51c6452aa4659217f0549990
5
5
  SHA512:
6
- metadata.gz: 8fd854a9b01b58d70012c293d5743c7d1632af4f52ac5bba8519885945c6e7ef40d0fc641a6ae5f5b958b9212c8b39d4e5dd7db144e6f8a3911e265cc2663ea7
7
- data.tar.gz: 07c9d9e75aa91ba7f4c9adcc6ee9c71ba681895773ea5dc83a11bbdfa6d2e1c374efffa48905bbe593ffd329ae4499721f048707f93b218b31573b8ee6f49af6
6
+ metadata.gz: da975ebe6e44e8efa59e7104ea7693fc854cbd0a501efd601c3df94a572b4b76ab1d422cc6e1eadeef09d0039cbf88fa4787c3dcbc45a013fa9a99e43e4a16d2
7
+ data.tar.gz: 0dc703252b6360aa7ca0d36b7736c5b148935ae21818613cc9a47e0794849ecc23155e5a4fbbac7edf888efb531f3c53d73dc95d0d3052e8c44474846b35e511
@@ -125,6 +125,7 @@ module MarkdownRubyDocumentation
125
125
  :ruby_operators_to_english,
126
126
  :nil_check_readable,
127
127
  :question_mark_method_format,
128
+ :symbol_to_proc,
128
129
  :methods_as_local_links,
129
130
  :remove_end_keyword,
130
131
  :constants_with_name_and_value,
@@ -395,8 +396,18 @@ module MarkdownRubyDocumentation
395
396
  end
396
397
  end
397
398
 
398
- def remove_end_keyword(ruby_source, *)
399
- ruby_source.gsub(/^[\s]*end\n?/, "")
399
+ def symbol_to_proc(ruby_source, proc: false)
400
+ conversions = {
401
+ /\(&:([a-z_?!]*)\)/ => " \\1"
402
+ }
403
+ gsub_replacement(ruby_source, conversions, proc: proc)
404
+ end
405
+
406
+ def remove_end_keyword(ruby_source, proc: false)
407
+ conversions = {
408
+ /^[\s]*end\n?/ => ""
409
+ }
410
+ gsub_replacement(ruby_source, conversions, proc: proc)
400
411
  end
401
412
 
402
413
  def ruby_if_statement_to_md(ruby_source, proc: false)
@@ -1,3 +1,3 @@
1
1
  module MarkdownRubyDocumentation
2
- VERSION = "0.11.0"
2
+ VERSION = "0.12.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markdown_ruby_documentation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dustin Zeisler