around_the_world 0.19.0 → 0.19.1
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 +4 -4
- data/lib/around_the_world/version.rb +1 -1
- data/lib/around_the_world.rb +21 -4
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 890f7602229b6d808f1ca3235ef57df6f9c28e683d8edefbe828c7d13b4bc36c
|
|
4
|
+
data.tar.gz: 6883ab67d3691a80bbf12c169bc5005a6af03dfae58142495d756b3db6f82cf1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cface96352344a4062c55b595aca143fe8ac6f66bda65da466fe13007699c0a703700f7d4d5d8de8e1804917c0c1a6a063f6da1768293ce0ce21fa6fe7aca4ae
|
|
7
|
+
data.tar.gz: ff89efc5b7c83ab87f182337392c151af4f057cd5be0ca8af28196ea598b683fbe9606f13e04301824e46ea442ac05fcb4e6bc7867366b67c351a9b7a0cf9cf5
|
data/lib/around_the_world.rb
CHANGED
|
@@ -11,10 +11,10 @@ module AroundTheWorld
|
|
|
11
11
|
extend ActiveSupport::Concern
|
|
12
12
|
|
|
13
13
|
included do
|
|
14
|
-
extend
|
|
14
|
+
singleton_class.extend(AroundTheWorld::ClassMethods)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
|
|
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
|
-
#
|
|
28
|
+
# "Something happened!"
|
|
29
29
|
# else
|
|
30
|
-
#
|
|
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.
|
|
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-
|
|
11
|
+
date: 2019-11-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|