Sha256: 0120147087d6effd8891395631ee37558a7796b62144869ccd1546ed571b0f86

Contents?: true

Size: 660 Bytes

Versions: 60

Compression:

Stored size: 660 Bytes

Contents

module Vanity
  module Commands
    class << self
      # Lists all experiments and metrics.
      def list
        Vanity.playground.experiments.each do |id, experiment|
          puts "experiment :%-.20s (%-.40s)" % [id, experiment.name]
          if experiment.respond_to?(:alternatives)
            experiment.alternatives.each do |alt|
              hash = experiment.fingerprint(alt)
              puts "  %s: %-40.40s  (%s)" % [alt.name, alt.value, hash]
            end
          end
        end
        Vanity.playground.metrics.each do |id, metric|
          puts "metric :%-.20s (%-.40s)" % [id, metric.name]
        end
      end
    end
  end
end

Version data entries

60 entries across 60 versions & 7 rubygems

Version Path
vanity-3.1.0 lib/vanity/commands/list.rb
vanity-3.0.2 lib/vanity/commands/list.rb
vanity-3.0.1 lib/vanity/commands/list.rb
vanity-3.0.0 lib/vanity/commands/list.rb
vanity-2.2.10 lib/vanity/commands/list.rb
vanity-2.2.9 lib/vanity/commands/list.rb
vanity-2.2.8 lib/vanity/commands/list.rb
vanity-2.2.7 lib/vanity/commands/list.rb
vanity-2.2.6 lib/vanity/commands/list.rb
vanity-2.2.4 lib/vanity/commands/list.rb
vanity-2.2.3 lib/vanity/commands/list.rb
vanity-2.2.2 lib/vanity/commands/list.rb
vanity-2.2.1 lib/vanity/commands/list.rb
vanity-2.2.0 lib/vanity/commands/list.rb
vanity-2.1.2 lib/vanity/commands/list.rb
vanity-2.1.1 lib/vanity/commands/list.rb
vanity-2.1.0 lib/vanity/commands/list.rb
vanity-2.0.1 lib/vanity/commands/list.rb
vanity-2.0.0 lib/vanity/commands/list.rb
vanity-2.0.0.beta9 lib/vanity/commands/list.rb