formatted-metrics 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,8 +7,8 @@ module Metrics
7
7
  # Public: See Metrics.instrument.
8
8
  #
9
9
  # Returns nothing.
10
- def instrument(*args)
11
- Metrics.instrument(*args)
10
+ def instrument(*args, &block)
11
+ Metrics.instrument(*args, &block)
12
12
  end
13
13
 
14
14
  module ClassMethods
@@ -58,9 +58,9 @@ module Metrics
58
58
  visibility = %w[public private protected].find { |visibility| send :"#{visibility}_method_defined?", name }
59
59
  method = instance_method(name)
60
60
  define_method name do |*args, &block|
61
- method = method.bind(self)
61
+ bound_method = method.bind(self)
62
62
  instrument [self.class.metric_namespace, name].join('.') do
63
- method.call(*args, &block)
63
+ bound_method.call(*args, &block)
64
64
  end
65
65
  end
66
66
  send visibility, name
@@ -1,3 +1,3 @@
1
1
  module FormattedMetrics
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: formatted-metrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-31 00:00:00.000000000 Z
12
+ date: 2013-08-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -118,7 +118,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
118
118
  version: '0'
119
119
  segments:
120
120
  - 0
121
- hash: -3422730749197559336
121
+ hash: 3996824533654681109
122
122
  required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  none: false
124
124
  requirements:
@@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
127
  version: '0'
128
128
  segments:
129
129
  - 0
130
- hash: -3422730749197559336
130
+ hash: 3996824533654681109
131
131
  requirements: []
132
132
  rubyforge_project:
133
133
  rubygems_version: 1.8.23