Class: Capistrano::MetricMessage

### Home Classes Methods

### In Files

- lib/capistrano-stats/metric-message.rb

### Parent

Object

### Methods

- ::new
- #anonymize!
- #to_s

### Class/Module Index

Quicksearch

- Capistrano
- Capistrano::MetricCollector
- Capistrano::MetricMessage
- Capistrano::Stats
- Object

No matching classes.

# Capistrano::MetricMessage

### Constants

SERIALIZE_ATTRIBUTES
VERSION

### Public Class Methods

new(attributes = {}) click to toggle source

    # File lib/capistrano-stats/metric-message.rb, line 17
    def initialize(attributes = {})
      @attributes = attributes.merge({
          :version            => VERSION,
          :datetime           => Time.now.iso8601,
          :capistrano_version => capistrano_version,
      })
    end

### Public Instance Methods

anonymize!() click to toggle source

    # File lib/capistrano-stats/metric-message.rb, line 29
    def anonymize!
      @attributes.each do |attr, value|
        @attributes[attr] = 'anonymous' unless attr == :version
      end
    end

to_s() click to toggle source

    # File lib/capistrano-stats/metric-message.rb, line 25
    def to_s
      @attributes.values_at(*SERIALIZE_ATTRIBUTES).join("|")
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.