Module: Cabin::Metric
- Includes:
- Inspectable, Publisher
- Included in:
- Cabin::Metrics::Counter, Cabin::Metrics::Gauge, Cabin::Metrics::Histogram, Cabin::Metrics::Meter
- Defined in:
- lib/cabin/metric.rb
Instance Method Summary collapse
-
#emit ⇒ Object
def instance.
-
#instance ⇒ Object
def instance=.
- #instance=(instance) ⇒ Object
Methods included from Publisher
Methods included from Inspectable
Instance Method Details
#emit ⇒ Object
def instance
17 18 19 20 21 |
# File 'lib/cabin/metric.rb', line 17 def emit if !@channel.nil? @channel.publish({ :metric => instance }.merge(to_hash)) end end |
#instance ⇒ Object
def instance=
13 14 15 |
# File 'lib/cabin/metric.rb', line 13 def instance return @instance end |
#instance=(instance) ⇒ Object
9 10 11 |
# File 'lib/cabin/metric.rb', line 9 def instance=(instance) @instance = instance end |