around_the_world 0.19.0 → 0.19.1

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
  SHA256:
3
- metadata.gz: 142ebc91ef8ab63243cc07303edcdde74160b5c9e91e643785c1899ea0714f5b
4
- data.tar.gz: cdf79e5bf4758342f2150c0599f6c4e2c6e94e590582cacee3e41faa5bea9272
3
+ metadata.gz: 890f7602229b6d808f1ca3235ef57df6f9c28e683d8edefbe828c7d13b4bc36c
4
+ data.tar.gz: 6883ab67d3691a80bbf12c169bc5005a6af03dfae58142495d756b3db6f82cf1
5
5
  SHA512:
6
- metadata.gz: 246bacbc61eb24e19a261af57873b503df57b8659ba34787dc747f0f7635fd101b5ad2e534fd8d9d9caca4be96fb15152346a58fbb8958337412a7166cb07ec5
7
- data.tar.gz: 47542a9168fdd9b9df42b1ed679355815adc7f920f2c19f3210f66d6105e9021594c72b5c44889abe21f4b355a5de22f1a167de09eb3fcc00e916711cff10f6d
6
+ metadata.gz: cface96352344a4062c55b595aca143fe8ac6f66bda65da466fe13007699c0a703700f7d4d5d8de8e1804917c0c1a6a063f6da1768293ce0ce21fa6fe7aca4ae
7
+ data.tar.gz: ff89efc5b7c83ab87f182337392c151af4f057cd5be0ca8af28196ea598b683fbe9606f13e04301824e46ea442ac05fcb4e6bc7867366b67c351a9b7a0cf9cf5
@@ -2,5 +2,5 @@
2
2
 
3
3
  module AroundTheWorld
4
4
  # This constant is managed by spicerack
5
- VERSION = "0.19.0"
5
+ VERSION = "0.19.1"
6
6
  end
@@ -11,10 +11,10 @@ module AroundTheWorld
11
11
  extend ActiveSupport::Concern
12
12
 
13
13
  included do
14
- extend ActiveSupport::DescendantsTracker
14
+ singleton_class.extend(AroundTheWorld::ClassMethods)
15
15
  end
16
16
 
17
- class_methods do
17
+ module ClassMethods
18
18
  protected
19
19
 
20
20
  # Defines a method that gets called +around+ the given instance method.
@@ -25,9 +25,9 @@ module AroundTheWorld
25
25
  # things_happened = super
26
26
  #
27
27
  # if things_happened
28
- # puts "Something happened!"
28
+ # "Something happened!"
29
29
  # else
30
- # puts "Nothing to see here..."
30
+ # "Nothing to see here..."
31
31
  # end
32
32
  # end
33
33
  #
@@ -56,6 +56,23 @@ module AroundTheWorld
56
56
  # end
57
57
  # # => no error raised
58
58
  #
59
+ # @example
60
+ # class SomeClass
61
+ # include AroundTheWorld
62
+ #
63
+ # class << self
64
+ # def a_singleton_method; end
65
+ #
66
+ # around_method :a_singleton_method do
67
+ # super
68
+ # "It works for class methods too!"
69
+ # end
70
+ # end
71
+ # end
72
+ #
73
+ # SomeClass.a_singleton_method
74
+ # => "It works for class methods too!"
75
+ #
59
76
  # @param method_name [Symbol]
60
77
  # @param :prevent_double_wrapping_for [Object]
61
78
  # If defined, this prevents wrapping the method twice for a given purpose. Accepts any argument.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: around_the_world
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.0
4
+ version: 0.19.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Allen Rettberg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-21 00:00:00.000000000 Z
11
+ date: 2019-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport