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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a09494db3392aaca6d279d31c3023d6ffd20c508
|
4
|
+
data.tar.gz: 4e8b9fba4a5b9cdc51c6452aa4659217f0549990
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
399
|
-
|
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)
|