blabbermouth 0.0.8 → 0.0.9

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: 2f8cb1c408b36723e237f714d54d49ff20360b55
4
- data.tar.gz: 5168452e9248a9de95d65d09fc3375cc349775e9
3
+ metadata.gz: 4e9a9591a1b3b1d1afcc310059eb6dc8a5774434
4
+ data.tar.gz: 4895646ba5679dc0f79ddc1b2a46cdee6a2fa3c0
5
5
  SHA512:
6
- metadata.gz: b323b3bec6a44c4cf62a5fabd26129ed7ce3655616731dfb6ff3dcbb58bb98112e887ddb451eb6227966b8749224839b4e386d341d26f54d316e03ae96c94a53
7
- data.tar.gz: 90a45baffb26eb2336bae067b686949f34d3b78cab4687294bfedb9d5b9edcacdf347d8c949bee376a3c78ea1a980e3a45e9ac9efc39fbe7f3093d3f2aee7a90
6
+ metadata.gz: 2dfdc07371966920ef92f52e9f969a189664dd89c6c2c0ea933f30cb042b73f5fd2b26e40e1a1266a04ecdf1c6ea03899d6103a674c32aeefb5905a8f3ea0cb4
7
+ data.tar.gz: 304f6db25e1554b0fbcec5416096e0fb9b3299e035a5d4a89a601c1d7abd4c857812b9916c9d15aa9f331fa45bba2467f276c8515d74dcec110303820f127f29
data/lib/blabbermouth.rb CHANGED
@@ -41,4 +41,8 @@ module Blabbermouth
41
41
  def self.time(key, duration=nil, *args, &block)
42
42
  Blabbermouth::Blabber.time key, duration, *args, &block
43
43
  end
44
+
45
+ def self.flush(*args)
46
+ Blabbermouth::Blabber.flush *args
47
+ end
44
48
  end
@@ -34,6 +34,11 @@ module Blabbermouth
34
34
  bystanders, opts = parse_args(*args)
35
35
  new(*bystanders).time(key, duration, opts, &block)
36
36
  end
37
+
38
+ def flush(*args)
39
+ bystanders, opts = parse_args(*args)
40
+ new(*bystanders).flush
41
+ end
37
42
  end
38
43
 
39
44
  def add_bystander!(bystander)
@@ -98,6 +103,13 @@ module Blabbermouth
98
103
  end
99
104
  end
100
105
 
106
+ def flush
107
+ bystanders.map do |bystander|
108
+ next unless bystander.respond_to?(:flush)
109
+ bystander.flush
110
+ end
111
+ end
112
+
101
113
  def method_missing(meth, *args, &block)
102
114
  blab meth, *args, &block
103
115
  end
@@ -1,13 +1,14 @@
1
1
  module Blabbermouth
2
2
  module Bystanders
3
3
  module DynamicEvents
4
+ EXCLUDES = [:flush]
4
5
 
5
6
  def method_missing(meth, *args)
6
7
  blab meth, *args
7
8
  end
8
9
 
9
10
  def respond_to_missing?(meth, include_private=false)
10
- true
11
+ EXCLUDES.include?(meth) ? false : true
11
12
  end
12
13
  end
13
14
  end
@@ -1,3 +1,3 @@
1
1
  module Blabbermouth
2
- VERSION = '0.0.8'
2
+ VERSION = '0.0.9'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blabbermouth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Rebec