Module: Cabin::Metric

Instance Method Summary collapse

Methods included from Publisher

#channel, #channel=, #publish

Methods included from Inspectable

#inspect

Instance Method Details

#emitObject

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

#instanceObject

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