cpt_hook 0.3.0 → 0.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 290b3737b4f793c6e0195069dd2619371151acb3
4
- data.tar.gz: f3acdb2a5c73e36241291f692a3ffa947c066c00
3
+ metadata.gz: a116eb8f86f289b6c636b24a010c8edc436b2c76
4
+ data.tar.gz: 4af83342b09d95b6575e58a1e689c3ba2e53c05d
5
5
  SHA512:
6
- metadata.gz: f23f687885beeed890c16b38251b6a6e3d1facca64c687607dd1784a40544c0f26634b89cf769bf66cf768ae08e51ca0e5e1243c1f05ba1a7cd9c878cc57b95a
7
- data.tar.gz: 1961025f695ae8c109d83f1e973d6cc15f7c7b364b3941a7c2901c5cc5f0a9aa8fca325222b7dc0cb3b704893744651563f13978a28793dff865f05171cd1bfd
6
+ metadata.gz: 7d24905114ba71cb3d92c2d17063d707718483eb80793e8e1d37a64735d49b49399ac9f16d98a4eb2718b2d735547bd3e49bcf36a9b5fd01ad68a90302f19a30
7
+ data.tar.gz: 48d88e213daeac28789950882d52eee0e3dfe9f3c5ca3ac0dbe56b7b295519ff6eadd67517a70bfab6106a2b1c779895be3178b84adfe51c447f385bf087bc7e
@@ -9,6 +9,14 @@ module CptHook
9
9
  @with = []
10
10
  end
11
11
 
12
+ def resolve_with(&block)
13
+ @with.map!(&block)
14
+ end
15
+
16
+ def resolve_contexts(&block)
17
+ @contexts.map!(&block)
18
+ end
19
+
12
20
  def with(*args)
13
21
  @with = args
14
22
  end
@@ -8,7 +8,6 @@ module CptHook
8
8
  class Hookable < SimpleDelegator
9
9
  def initialize(obj, method_hooks, additional_contexts = [])
10
10
  super(obj)
11
-
12
11
  additional_contexts = [additional_contexts] unless additional_contexts.is_a?(Array)
13
12
  _add_hooks(:before, method_hooks, additional_contexts)
14
13
  _add_hooks(:after, method_hooks, additional_contexts)
@@ -1,3 +1,3 @@
1
1
  module CptHook
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cpt_hook
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - JDonavan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-07 00:00:00.000000000 Z
11
+ date: 2017-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler