markdown_ruby_documentation 0.19.0 → 0.20.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: 4a87e5dfae270a6b0c5dad3113bf644688887608
4
- data.tar.gz: 5cb9c9cb8008aced54b31d653052ee8bcc8488c7
3
+ metadata.gz: 3fcb7356d7e09284ecb22ea0937bf0fb4c8f1751
4
+ data.tar.gz: 9ab4ecee4c4c655610757083c39484faf7c8a935
5
5
  SHA512:
6
- metadata.gz: 3e6e3e86d8c4750508b6ae3f0377b67a1e0d820f8c8855751830536b3f5e7cd832e225a5d1d16ac6cb43a72b052df9b66139a38db149b5fa43082c6b3c3aa227
7
- data.tar.gz: 837969574c555e420046d92758b1e5ecd1f9e235a74eebd849f957ba93e45d9305a3502568d7d893b2b398032ed2fce56ca56af665b9df8627454bb8ef53d34f
6
+ metadata.gz: d05a9bc000e5c6ee10f20646b05161aa08fa118e17c51d3ce6e78533508e488a9b9d2fe87a4e7a399b582182ebb8e6e19ecbe843b9bbd60105240ef039d477e8
7
+ data.tar.gz: 246aba9398a76d322cf919b013179959800b8b5a9d14f1ce27bbf350dbb16f4987cb0086ec94d7e961b2868aabef5f6cd32ba60dca4df9be4205da22fb29b721
@@ -51,12 +51,15 @@ module MarkdownRubyDocumentation
51
51
  raise e.class, "#{ method.context}#{method.type_symbol}#{method.name}, \n#{e.message}"
52
52
  end
53
53
 
54
- CLASS_MACROS = [:attribute]
54
+ CLASS_MACROS = [
55
+ ->(name) {"attribute #{Regexp.escape(name.inspect)}"},
56
+ ->(name) {"def_delegator :.*, #{Regexp.escape(name.inspect)}"},
57
+ ]
55
58
  def source_location(file_path, name)
56
59
  return unless file_path && name
57
60
  found_match = nil
58
61
  CLASS_MACROS.each do |macro|
59
- if (ln = get_line_number(file_path.split(":").first, "#{macro} #{Regexp.escape(name.inspect)}"))
62
+ if (ln = get_line_number(file_path.split(":").first, macro.call(name)))
60
63
  found_match = ln
61
64
  end
62
65
  end
@@ -1,3 +1,3 @@
1
1
  module MarkdownRubyDocumentation
2
- VERSION = "0.19.0"
2
+ VERSION = "0.20.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.19.0
4
+ version: 0.20.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: 2017-02-14 00:00:00.000000000 Z
11
+ date: 2017-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: method_source