method_locator 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module MethodLocator
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -13,15 +13,11 @@ module MethodLocator
13
13
  end
14
14
 
15
15
  def method_lookup_path
16
- module_or_regular_object? ? nonclass_lookup_path : class_lookup_path
16
+ is_a?(Class) ? class_lookup_path : nonclass_lookup_path
17
17
  end
18
18
 
19
19
  private
20
20
 
21
- def module_or_regular_object?
22
- self.class == Module || !is_a?(Class)
23
- end
24
-
25
21
  def nonclass_lookup_path
26
22
  self.class.ancestors.unshift(singleton_class)
27
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: method_locator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-09-21 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &70159058806000 !ruby/object:Gem::Requirement
16
+ requirement: &70151278604820 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: 2.5.0
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70159058806000
24
+ version_requirements: *70151278604820
25
25
  description: Method Locator provides a way to traverse an object's method lookup path
26
26
  to find all places where a method may be defined.
27
27
  email: