method_introspection 0.0.2 → 0.0.4

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.

Potentially problematic release.


This version of method_introspection might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f8e37158912e43ca147a709371c78620db8933fb
4
- data.tar.gz: f1e14b2af4e5a389b52020a0bd0b64f6da5e021e
3
+ metadata.gz: 9aa2ca916fce1bc7710c586cd3834aa0ffb59ff6
4
+ data.tar.gz: dabc5d96f3fe52181515a192353558e401b47dee
5
5
  SHA512:
6
- metadata.gz: 3ba4cb7223cf9442f7ec90a11017c8b0119ee8109b27f047b505beb2e73ec358c4fd66816c249d6b3cb8c7eb6f16a81a196ec684714768ed08bbc35812ab70b4
7
- data.tar.gz: 6e3052cc8ea47e1a41a9596593062119145d35b49450d74e66354c435664d624ff97db9cc8d5145d31c333e8af38b1845cdc7e03d955b7915282f5cc1dde3ba5
6
+ metadata.gz: 87dea15bd1eb0ebd945291d3e316b5fd4409b8d46c804e39c5d097cae06c1321826873a04be56a80b34cdfefc9048f8e3eb2f392f3ac08cda111a9801973e6e5
7
+ data.tar.gz: 1094e9a859abaabc41e3ee2304d87b4017db98f2e74f8c40e91d3ae819596e606759b4a4515a93aa1f8e0c4f458c5f913c51d9e8afee9181783c46f16f0e9ecb
@@ -69,8 +69,10 @@ module MethodIntrospection # The top namespace of this project.
69
69
  # ========================================================================= #
70
70
  def self.source_helper(source_location, name = nil)
71
71
  raise_this(name) unless source_location
72
- file, line = *source_location
73
- expression_at(lines_for(file), line)
72
+ this_file, line_number = *source_location
73
+ MethodIntrospection.set_this_file(this_file)
74
+ MethodIntrospection.set_line_number(line_number)
75
+ expression_at(lines_for(this_file), line_number)
74
76
  rescue SyntaxError => error
75
77
  raise SourceNotFoundError,
76
78
  "Could not parse source for #{name}: #{error.message}"
@@ -115,9 +117,6 @@ module MethodIntrospection # The top namespace of this project.
115
117
  def self.comment_helper(source_location, name = nil)
116
118
  raise_this(name) unless source_location
117
119
  this_file, line_number = *source_location
118
- pp source_location
119
- pp this_file
120
- pp line_number
121
120
  MethodIntrospection.set_this_file(this_file)
122
121
  MethodIntrospection.set_line_number(line_number)
123
122
  comment_describing(lines_for(this_file), line_number)
@@ -1,5 +1,5 @@
1
1
  module MethodIntrospection
2
2
 
3
- VERSION = '0.0.2'
3
+ VERSION = '0.0.4'
4
4
 
5
5
  end
@@ -26,6 +26,7 @@ module MethodIntrospection
26
26
  MethodIntrospection.source_helper(source_location, defined?(name) ? name : inspect)
27
27
  end
28
28
 
29
+ # ======================================================================= #
29
30
  # === comment
30
31
  #
31
32
  # Return the comments associated with the method as a string.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: method_introspection
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert A. Heiler