markdown_ruby_documentation 0.6.0 → 0.7.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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c248958b8c7d4683bb64446558b9846c182c7b89
|
|
4
|
+
data.tar.gz: cc9fa458990652a3103b9bb9b00b8e6cb86235fb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e1f2f283abe8ea344d31d0eb9f2ad9a2afb324a5b02a2ac1cf3b0ae8806797dfa093efc78e80468a2ecc755f913b4247b62b0ffd3ed6419566ea96a309496801
|
|
7
|
+
data.tar.gz: 7c515980591c1c681066003eaa1a8b16991fb4eec78442c1718400c4146b1df1b3264fed9affdf4b7e935518fdceb5dfe77ec41fada6f1cf567792606863f11c
|
data/README.md
CHANGED
|
@@ -105,7 +105,7 @@ Converts case statements and if statements to bulleted markdown
|
|
|
105
105
|
* ruby_if_statement_to_md, options: proc(replacement, match)
|
|
106
106
|
* ruby_case_statement_to_md, options: proc(replacement, match)
|
|
107
107
|
* ruby_operators_to_english, options: proc(replacement, match)
|
|
108
|
-
* methods_as_local_links, options: method_to_class: { method_name => OwningConstant }
|
|
108
|
+
* methods_as_local_links, options: method_to_class: { method_name => OwningConstant }, proc(replacement, match)
|
|
109
109
|
* question_mark_method_format, options: proc(replacement, match)
|
|
110
110
|
* remove_end_keyword, options: proc(replacement, match)
|
|
111
111
|
* constants_with_name_and_value, options: proc(replacement, match, opt={})
|
|
@@ -339,14 +339,16 @@ module MarkdownRubyDocumentation
|
|
|
339
339
|
|
|
340
340
|
def methods_as_local_links(ruby_source,
|
|
341
341
|
call_on_title: :titleize,
|
|
342
|
-
method_to_class: {}
|
|
342
|
+
method_to_class: {},
|
|
343
|
+
proc: false)
|
|
343
344
|
ruby_source.gsub(MethodLink::RUBY_METHOD_REGEX) do |match|
|
|
344
345
|
if is_a_method_on_ruby_class?(match)
|
|
345
|
-
MethodLink.new(match: match,
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
346
|
+
replacement = MethodLink.new(match: match,
|
|
347
|
+
ruby_class: ruby_class,
|
|
348
|
+
call_on_title: call_on_title,
|
|
349
|
+
method_to_class: method_to_class,
|
|
350
|
+
link_to_markdown: method(:link_to_markdown)).link
|
|
351
|
+
proc ? proc.call(replacement, match) : replacement
|
|
350
352
|
else
|
|
351
353
|
match
|
|
352
354
|
end
|