class Onceover::Metrics::CLI

Public Class Methods

command() click to toggle source

Static method defining the new command to be added

# File lib/onceover/metrics/cli.rb, line 9
        def self.command
          @cmd ||= Cri::Command.define do
            name 'metrics'
            usage 'metrics [--format NAME]'
            summary "Metrics plugin for Onceover"
            description <<-DESCRIPTION
Output some handy code metrics so you can guage the size of your Puppet code
            DESCRIPTION

            option nil, :format, 'Format - json, csv or text', :argument => :optional, default: "text"
            flag nil, :detailed, 'Output per-class stats in text mode', :argument => :optional, default: false

            run do |opts, args, cmd|
              Onceover::Metrics::Metrics.run opts
            end
          end
        end